[profiles/desktop] modify neovim config
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user