[profiles/desktop] modify neovim config

This commit is contained in:
2026-02-21 06:01:49 +01:00
parent d1e79cf7f4
commit abf96107ab
2 changed files with 28 additions and 10 deletions

View File

@@ -30,6 +30,24 @@ vim.opt.clipboard:append({ 'unnamedplus', 'unnamed' }) -- always use clipboard i
vim.o.encoding = 'UTF-8' -- sets the character encoding used inside vim
vim.o.title = true -- when on, the title of the window will be set to the value of 'titlestring'
vim.o.signcolumn = 'yes'
local augroup_ec = vim.api.nvim_create_augroup('augroup_ec', { clear = true })
vim.api.nvim_create_autocmd('BufEnter', {
group = augroup_ec,
pattern = '*',
callback = function(args)
local ec = vim.b[args.buf].editorconfig
if not ec then
return
end
local max_len = ec.max_line_length
if max_len and max_len ~= 'off' then
vim.opt_local.colorcolumn = max_len
else
vim.opt_local.colorcolumn = ''
end
end,
})
-- spell checking
vim.o.spell = true