diff --git a/lua/config/lightbulb.lua b/lua/config/lightbulb.lua new file mode 100644 index 0000000..8f49746 --- /dev/null +++ b/lua/config/lightbulb.lua @@ -0,0 +1,20 @@ +---@diagnostic disable: missing-fields +require("nvim-lightbulb").setup { + autocmd = { + enabled = true, + updatetime = -1, + }, + ---@diagnostic disable-next-line: unused-local + filter = function(client_name, result) + -- Ruff always sends these two actions even if there are no action to take, + -- so it is better to just ignore this to avoid noise. See also discussion below: + -- https://github.com/astral-sh/ruff-lsp/issues/91 + local ignored_kinds = { "source.fixAll.ruff", "source.organizeImports.ruff" } + + if vim.tbl_contains(ignored_kinds, result.kind) then + return false + end + + return true + end, +} diff --git a/lua/plugin_specs.lua b/lua/plugin_specs.lua index 2bdbd62..b5d64b3 100644 --- a/lua/plugin_specs.lua +++ b/lua/plugin_specs.lua @@ -553,7 +553,13 @@ local plugin_specs = { { "folke/lazydev.nvim", ft = "lua", -- only load on lua files - opts = {}, + opts = { + library = { + -- See the configuration section for more details + -- Load luvit types when the `vim.uv` word is found + { path = "${3rd}/luv/library", words = { "vim%.uv" } }, + }, + }, }, { "CopilotC-Nvim/CopilotChat.nvim", @@ -589,7 +595,7 @@ local plugin_specs = { -- see discussion here: https://github.com/neovim/neovim/issues/14869 "kosayoda/nvim-lightbulb", config = function() - require("nvim-lightbulb").setup { autocmd = { enabled = true } } + require("config.lightbulb") end, }, { @@ -603,6 +609,7 @@ local plugin_specs = { }, } +---@diagnostic disable-next-line: missing-fields require("lazy").setup { spec = plugin_specs, ui = {