From 0c9780cdd5e3af9b7fefd3b782d693cffc1d07de Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Sun, 3 Mar 2024 22:43:39 +0000 Subject: [PATCH] Ignore lua-ls warnings about missing-fields --- lua/plugins/completions.lua | 12 ++++++++++++ lua/plugins/surround.lua | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/lua/plugins/completions.lua b/lua/plugins/completions.lua index cdf2613..8fe8737 100644 --- a/lua/plugins/completions.lua +++ b/lua/plugins/completions.lua @@ -32,6 +32,18 @@ return { function(server_name) require('lspconfig')[server_name].setup({}) end, + ['lua_ls'] = function() + local lspconfig = require('lspconfig') + lspconfig.lua_ls.setup({ + settings = { + Lua = { + diagnostics = { + disable = { "missing-fields" }, + } + } + } + }) + end }, }) diff --git a/lua/plugins/surround.lua b/lua/plugins/surround.lua index 477144c..f4a7031 100644 --- a/lua/plugins/surround.lua +++ b/lua/plugins/surround.lua @@ -1,4 +1,4 @@ -return{ +return { 'kylechui/nvim-surround', version = "*", -- Use for stability; omit to use `main` branch for the latest features event = "VeryLazy",