From d89cc0c05336d7a6be5d85bbc7609e0dfd4e9bae Mon Sep 17 00:00:00 2001 From: Marko Korhonen Date: Tue, 21 Nov 2023 22:31:07 +0200 Subject: [PATCH] Refine neodev config --- home/.config/nvim/lua/plugins/mason.lua | 10 ---------- home/.config/nvim/lua/plugins/neodev.lua | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 10 deletions(-) create mode 100644 home/.config/nvim/lua/plugins/neodev.lua diff --git a/home/.config/nvim/lua/plugins/mason.lua b/home/.config/nvim/lua/plugins/mason.lua index 20715cac..037851aa 100644 --- a/home/.config/nvim/lua/plugins/mason.lua +++ b/home/.config/nvim/lua/plugins/mason.lua @@ -8,16 +8,6 @@ return { "WhoIsSethDaniel/mason-tool-installer.nvim", -- Extended functionality for jdtls "mfussenegger/nvim-jdtls", - -- Neovim setup for init.lua and plugin development with full signature help, docs and completion for the nvim lua API. - { - "folke/neodev.nvim", - opts = { - override = function(_, library) - library.enabled = true - library.plugins = true - end, - }, - }, }, config = function() require("mason").setup() diff --git a/home/.config/nvim/lua/plugins/neodev.lua b/home/.config/nvim/lua/plugins/neodev.lua new file mode 100644 index 00000000..e6532e8c --- /dev/null +++ b/home/.config/nvim/lua/plugins/neodev.lua @@ -0,0 +1,14 @@ +return { + -- Neovim setup for init.lua and plugin development with full signature help, docs and completion for the nvim lua API. + "folke/neodev.nvim", + ---@type LuaDevOptions + opts = { + override = function(root_dir, library) + local dotfiles_path = tostring(vim.fn.expand("~/git/dotfiles")) + if string.find(root_dir, dotfiles_path, 1, true) then + library.enabled = true + library.plugins = true + end + end, + }, +}