From 1bca80e56aab363fa838f6d586426e63de875210 Mon Sep 17 00:00:00 2001 From: Damjan 9000 Date: Tue, 12 Mar 2024 22:06:12 +0100 Subject: [PATCH] Added folke/neodev.nvim for proper nvim api completion and annotation (#754) Fixes nvim-lua/kickstart.nvim#692 `neodev` configures Lua LSP for your Neovim config, runtime and plugins used for completion, annotations and signatures of Neovim apis With neodev, there's no more need to manually set lua_ls workspace settings which don't seem to work properly anyway as currently nvim api completion does not work. --- init.lua | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/init.lua b/init.lua index cbaf96f..b9311f7 100644 --- a/init.lua +++ b/init.lua @@ -436,6 +436,10 @@ require('lazy').setup({ -- Useful status updates for LSP. -- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})` { 'j-hui/fidget.nvim', opts = {} }, + + -- `neodev` configures Lua LSP for your Neovim config, runtime and plugins + -- used for completion, annotations and signatures of Neovim apis + { 'folke/neodev.nvim', opts = {} }, }, config = function() -- Brief Aside: **What is LSP?** @@ -575,18 +579,6 @@ require('lazy').setup({ -- capabilities = {}, settings = { Lua = { - runtime = { version = 'LuaJIT' }, - workspace = { - checkThirdParty = false, - -- Tells lua_ls where to find all the Lua files that you have loaded - -- for your neovim configuration. - library = { - '${3rd}/luv/library', - unpack(vim.api.nvim_get_runtime_file('', true)), - }, - -- If lua_ls is really slow on your computer, you can try this instead: - -- library = { vim.env.VIMRUNTIME }, - }, completion = { callSnippet = 'Replace', },