refactor autocommands

This commit is contained in:
christianchiarulli 2021-06-30 18:45:40 -04:00
parent d8cf871a38
commit 9e7ad60747
14 changed files with 283 additions and 298 deletions

View file

@ -19,9 +19,23 @@ require'lspconfig'.sumneko_lua.setup {
},
workspace = {
-- Make the server aware of Neovim runtime files
library = {[vim.fn.expand('$VIMRUNTIME/lua')] = true, [vim.fn.expand('$VIMRUNTIME/lua/vim/lsp')] = true},
library = {
[vim.fn.expand('$VIMRUNTIME/lua')] = true,
[vim.fn.expand('$VIMRUNTIME/lua/vim/lsp')] = true
},
maxPreload = 10000
}
}
}
}
if O.lang.lua.autoformat then
require('lv-utils').define_augroups({
_lua_autoformat = {
{
'BufWritePre', '*.lua',
'lua vim.lsp.buf.formatting_sync(nil, 1000)'
}
}
})
end