Files
dotfiles/.config/nvim/lua/core/autocmds.lua
T
cdanesi c63484d087 chore: update telekasten config
add helper commands for additional note creation (review templates)
fix markdown wrap
re-enable note link commands
2026-05-09 21:56:42 -04:00

39 lines
1.1 KiB
Lua

local autocmd = vim.api.nvim_create_autocmd
local augroup = vim.api.nvim_create_augroup
local o = vim.opt_local
-- ──────────────────[ set options for markdown files ]───────────────
autocmd('FileType', {
pattern = { 'markdown', 'telekasten' },
callback = function()
o.colorcolumn = '81'
o.wrap = true
o.linebreak = true
o.breakindent = true
o.textwidth = 80
o.spell = true
end,
})
-- ─────────────────────[ set options for gitcommit ]─────────────────────
autocmd('FileType', {
pattern = 'gitcommit',
callback = function()
o.colorcolumn = '+1,+2'
o.textwidth = 78
o.spell = true
end,
})
-- ┌
-- │ Highlight on yank
-- │ from https://github.com/raymon-roos/neovim-config/blob/main/lua/core/autocmds.lua
-- └
augroup('YankHighlight', { clear = true })
autocmd('TextYankPost', {
group = 'YankHighlight',
callback = function()
vim.highlight.on_yank({ higroup = 'IncSearch', timeout = '800' })
end,
})