From 248d04c2b0f6a0b8f007a75743df6bf2a26ef9a3 Mon Sep 17 00:00:00 2001 From: matt1432 Date: Tue, 7 Jan 2025 22:24:24 -0500 Subject: [PATCH] feat(nvim): neodev -> lazydev --- homeManagerModules/neovim/langs/lua/default.nix | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/homeManagerModules/neovim/langs/lua/default.nix b/homeManagerModules/neovim/langs/lua/default.nix index 8dace085..f0d41972 100644 --- a/homeManagerModules/neovim/langs/lua/default.nix +++ b/homeManagerModules/neovim/langs/lua/default.nix @@ -15,7 +15,7 @@ in { neovim = { plugins = [ { - plugin = pkgs.vimPlugins.neodev-nvim; + plugin = pkgs.vimPlugins.lazydev-nvim; type = "lua"; config = # lua @@ -38,14 +38,11 @@ in { end, }); - -- IMPORTANT: make sure to setup neodev BEFORE lspconfig - require("neodev").setup({ - override = function(root_dir, library) - if root_dir:find('${flakeEnv}', 1, true) == 1 then - library.enabled = true; - library.plugins = true; - end - end, + require('lazydev').setup({ + library = { + -- Load luvit types when the `vim.uv` word is found + { path = '${pkgs.vimPlugins.luvit-meta}/library', words = { 'vim%.uv' } }, + }, }); require('lspconfig').lua_ls.setup({