diff options
Diffstat (limited to '.vim/lua')
| -rw-r--r-- | .vim/lua/lsp.lua | 39 |
1 files changed, 33 insertions, 6 deletions
diff --git a/.vim/lua/lsp.lua b/.vim/lua/lsp.lua index efba1b1..215b269 100644 --- a/.vim/lua/lsp.lua +++ b/.vim/lua/lsp.lua @@ -165,14 +165,40 @@ local servers = { Lua = { runtime = { version = 'LuaJIT', - path = lua_runtime_path, + path = vim.split(package.path, ';'), }, diagnostics = { - globals = { 'vim' }, + globals = { + '_G', + 'error', + 'os', + 'package', + 'pairs', 'ipairs', + 'pcall', + 'require', + 'string', + 'table', + 'type', + 'vim', + }, + neededFileStatus = { + ['code-style-check'] = 'Any', + } + }, + format = { + enable = true, + defaultConfig = { + indent_style = 'space', + indent_size = '2', + } + }, + workspace = { + -- library = vim.api.nvim_get_runtime_file("", true), + library = { + [vim.env.VIMRUNTIME .. '/lua'] = true, + [vim.env.VIMRUNTIME .. '/lua/vim/lsp'] = true, + } }, - -- workspace = { - -- library = vim.api.nvim_get_runtime_file('', true) - -- }, telemetry = { enable = false, }, @@ -196,7 +222,8 @@ local servers = { '. /etc/profile.d/nvm.sh && typescript-language-server --stdio' }, }, - zls = { disabled = true }, + zls = { disabled = true, + }, zk = { disabled = true, root_dir = lsp.util.root_pattern('.zk'), }, |