From 3ad195128360a4ddd2777ddcb8592f3a5b652f37 Mon Sep 17 00:00:00 2001 From: Ruthenic Date: Tue, 16 Nov 2021 17:30:53 -0500 Subject: [PATCH] Fix lua LSP not ignoring vim global --- lua/plugins.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lua/plugins.lua b/lua/plugins.lua index 734563c..2eca210 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -27,14 +27,14 @@ table.insert(runtime_path, "lua/?/init.lua") local sumneko_root_path = '/home/ruthenic/lua-language-server/bin/Linux/' require'lspconfig'.sumneko_lua.setup { cmd = {sumneko_root_path .. "lua-language-server", "-E", sumneko_root_path .. "main.lua"}, - coq.lsp_ensure_capabilities({settings = { + settings = { Lua = { runtime = { version = 'LuaJIT', path = runtime_path, }, diagnostics = { - globals = {'vim'}, + globals = {'vim', 'use'}, }, workspace = { library = vim.api.nvim_get_runtime_file("", true), @@ -43,7 +43,8 @@ require'lspconfig'.sumneko_lua.setup { enable = false, }, }, - }}) + }, + coq.lsp_ensure_capabilities(), } vim.cmd('COQnow -s')