From 117c6aabc2298b5314fa55b42b55a006f641c122 Mon Sep 17 00:00:00 2001 From: Michael Mandl Date: Fri, 24 Jun 2022 13:08:02 +0200 Subject: [PATCH] feat(nvim): enable nvim support in lua lsp --- home-mandlm.nix | 1 + nvim/lua/plugins/lspconfig.lua | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/home-mandlm.nix b/home-mandlm.nix index eaf1c95..7e223bb 100644 --- a/home-mandlm.nix +++ b/home-mandlm.nix @@ -145,6 +145,7 @@ nvim-lspconfig lsp-status-nvim rust-tools-nvim + lua-dev-nvim ]; extraConfig = '' diff --git a/nvim/lua/plugins/lspconfig.lua b/nvim/lua/plugins/lspconfig.lua index e72cda9..64c1f16 100644 --- a/nvim/lua/plugins/lspconfig.lua +++ b/nvim/lua/plugins/lspconfig.lua @@ -46,16 +46,6 @@ capabilities = require("cmp_nvim_lsp").update_capabilities(capabilities) local servers = { ["bashls"] = {}, - ["sumneko_lua"] = { - Lua = { - diagnostics = { - globals = { "vim" }, - }, - telemetry = { - enable = false, - }, - }, - }, ["rnix"] = {}, ["terraformls"] = {}, ["tflint"] = {}, @@ -88,3 +78,13 @@ require("rust-tools").setup({ capabilities = capabilities, }, }) + +local luadev = require("lua-dev").setup({ + lspconfig = { + on_attach = on_attach, + capabilities = capabilities, + }, + runtime_path = true, +}) + +lspconfig["sumneko_lua"].setup(luadev)