vim: make lua_ls work with neovim

This commit is contained in:
Fernando Schauenburg 2023-07-09 14:06:50 +02:00
parent 90d7f05e4b
commit c53a9014b9

View file

@ -41,8 +41,27 @@ local config = function()
} }
end, end,
-- server-specific handlers lua_ls = function()
-- ['server'] = function() --[[ server-specific stuff... ]] end require'lspconfig'.lua_ls.setup {
on_attach = on_attach,
capabilities = capabilities,
settings = {
Lua = {
-- I'm using lua only inside neovim, so the runtime is LuaJIT.
runtime = { version = 'LuaJIT' },
-- Get the language server to recognize the `vim` global.
diagnostics = { globals = {'vim'} },
-- Make the server aware of Neovim runtime files.
workspace = { library = vim.api.nvim_get_runtime_file("", true) },
-- Do not send telemetry data containing a randomized but unique identifier
telemetry = { enable = false },
},
},
}
end,
} }
} }
end end