dotfiles/.config/nvim/lua/config/autocmds.lua
histalek 69465809e5
feat(nvim): Test out my take on blinry's vimboy wiki
Today i watched the recording of Blinry's talk about their personal wiki
at MRMCD23 [1] and was intrigued by the simplicity of it.

For now i only took the highlight group, syntax match and autocmd to set
the filetype.
This gives me the highlighting of 'wiki files'. As for opening those
files i'll use `gf`.

I'll probably iterate on this if i like and use it to a degree.

[1] https://media.ccc.de/v/2023-301-warum-ihr-alle-ein-persnliches-wiki-haben-wollt
2023-09-04 19:02:33 +02:00

11 lines
422 B
Lua

-- Autocmds are automatically loaded on the VeryLazy event
-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua
-- Add any additional autocmds here
--- test blinry's wiki setup
vim.api.nvim_create_autocmd({ "bufnewfile", "bufread" }, {
pattern = os.getenv("HOME") .. "/Documents/wiki/*",
callback = function()
vim.bo.filetype = "hiswiki"
end,
})