mirror of
https://github.com/jdhao/nvim-config.git
synced 2025-06-08 14:14:33 +02:00
update config for lazydev and nvim-lightbulb (#391)
This commit is contained in:
20
lua/config/lightbulb.lua
Normal file
20
lua/config/lightbulb.lua
Normal file
@@ -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,
|
||||
}
|
||||
Reference in New Issue
Block a user