Skip to content

Commit 000a5c4

Browse files
authored
Added folke/neodev.nvim for proper nvim api completion and annotation (#754)
Fixes #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.
1 parent cb1f16b commit 000a5c4

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

init.lua

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,10 @@ require('lazy').setup({
410410
-- Useful status updates for LSP.
411411
-- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})`
412412
{ 'j-hui/fidget.nvim', opts = {} },
413+
414+
-- `neodev` configures Lua LSP for your Neovim config, runtime and plugins
415+
-- used for completion, annotations and signatures of Neovim apis
416+
{ 'folke/neodev.nvim', opts = {} },
413417
},
414418
config = function()
415419
-- Brief Aside: **What is LSP?**
@@ -551,18 +555,6 @@ require('lazy').setup({
551555
-- capabilities = {},
552556
settings = {
553557
Lua = {
554-
runtime = { version = 'LuaJIT' },
555-
workspace = {
556-
checkThirdParty = false,
557-
-- Tells lua_ls where to find all the Lua files that you have loaded
558-
-- for your neovim configuration.
559-
library = {
560-
'${3rd}/luv/library',
561-
unpack(vim.api.nvim_get_runtime_file('', true)),
562-
},
563-
-- If lua_ls is really slow on your computer, you can try this instead:
564-
-- library = { vim.env.VIMRUNTIME },
565-
},
566558
completion = {
567559
callSnippet = 'Replace',
568560
},

0 commit comments

Comments
 (0)