Fix trouble on newer neovim

This commit is contained in:
ViViDboarder 2025-01-08 11:42:12 -08:00
parent 6af1770c36
commit d76cb9bd06
2 changed files with 2 additions and 9 deletions

View File

@ -379,7 +379,9 @@ return {
-- Better display of lsp diagnostics -- Better display of lsp diagnostics
{ {
"https://github.com/folke/trouble.nvim", "https://github.com/folke/trouble.nvim",
config = true,
version = utils.map_version_rule({ version = utils.map_version_rule({
[">=0.9.2"] = "3.x.x",
[">=0.7.2"] = "2.x.x", [">=0.7.2"] = "2.x.x",
["<0.7.2"] = "1.x.x", ["<0.7.2"] = "1.x.x",
}), }),

View File

@ -25,15 +25,6 @@ function M.config_lsp_ui()
local hl = "DiagnosticSign" .. type local hl = "DiagnosticSign" .. type
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl }) vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
end end
utils.try_require("trouble", function(trouble)
trouble.setup({
fold_open = "",
fold_closed = "",
icons = require("icons").nerd_font,
use_diagnostic_signs = true,
})
end)
end end
function M.get_default_attach(override_capabilities) function M.get_default_attach(override_capabilities)