From db4061d12af89df7ae6d1e17e88932a1e869fca9 Mon Sep 17 00:00:00 2001 From: Victor Siman'kin Date: Thu, 2 Nov 2023 02:56:42 +0300 Subject: [PATCH] prevent "nvim Undefined global `vim`." --- lua/lazyvim/plugins/lsp/init.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/lazyvim/plugins/lsp/init.lua b/lua/lazyvim/plugins/lsp/init.lua index f0823e46..31ee360e 100644 --- a/lua/lazyvim/plugins/lsp/init.lua +++ b/lua/lazyvim/plugins/lsp/init.lua @@ -59,6 +59,10 @@ return { completion = { callSnippet = "Replace", }, + diagnostics = { + -- Get the language server to recognize the `vim` global + globals = { "vim", "require" }, + }, }, }, },