From f9a922636da45f6e68992cdf56481113868375e6 Mon Sep 17 00:00:00 2001 From: Jidbo Date: Thu, 23 Feb 2023 15:25:27 +0100 Subject: [PATCH] switch to lua ls --- nvim/lua/autocompletion.lua | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/nvim/lua/autocompletion.lua b/nvim/lua/autocompletion.lua index 0ac6495..28ac697 100644 --- a/nvim/lua/autocompletion.lua +++ b/nvim/lua/autocompletion.lua @@ -78,12 +78,24 @@ for _, server in ipairs(lsp_installer.get_installed_servers()) do end -- EXTRA SETUP -lspconfig.sumneko_lua.setup { +require'lspconfig'.lua_ls.setup { settings = { Lua = { + runtime = { + -- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim) + version = 'LuaJIT', + }, diagnostics = { -- Get the language server to recognize the `vim` global - globals = { 'vim' }, + globals = {'vim'}, + }, + workspace = { + -- Make the server aware of Neovim runtime files + library = vim.api.nvim_get_runtime_file("", true), + }, + -- Do not send telemetry data containing a randomized but unique identifier + telemetry = { + enable = false, }, }, },