From 951458be2eeaf67869ab495baec65bb0018848fd Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Tue, 18 Jul 2023 10:55:38 +0100 Subject: [PATCH] Stop lua_ls popup on every open --- lua/plugins/lspconfig.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 12055a1..b43986e 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -56,7 +56,14 @@ local config = function() lsp["pylsp"].setup(lsp_config) end if vim.fn.executable "ruff-lsp" == 1 then lsp["ruff_lsp"].setup(lsp_config) end - if vim.fn.executable "lua-language-server" == 1 then lsp["lua_ls"].setup(lsp_config) end + if vim.fn.executable "lua-language-server" == 1 then + lsp["lua_ls"].setup { + on_attach = lsp_config.on_attach, + flags = lsp_config.flags, + capabilities = lsp_config.capabilities, + settings = { Lua = { workspace = { checkThirdParty = false } } }, + } + end if vim.fn.executable "nil" == 1 then lsp["nil_ls"].setup(lsp_config) end if vim.fn.executable "fortls" == 1 then lsp["fortls"].setup(lsp_config) end if vim.fn.executable "yaml-language-server" == 1 then lsp["yamlls"].setup(lsp_config) end