diff --git a/lua/znvim/plugins/editor.lua b/lua/znvim/plugins/editor.lua index d45699f..5081837 100644 --- a/lua/znvim/plugins/editor.lua +++ b/lua/znvim/plugins/editor.lua @@ -163,8 +163,80 @@ return { }, }, }, - - + { -- better diagnostics list and others + "https://github.com/folke/trouble.nvim", + cmd = "Trouble", + keys = { + { + "xx", + "Trouble diagnostics toggle", + desc = "Diagnostics (Trouble)", + }, + { + "xX", + "Trouble diagnostics toggle filter.buf=0", + desc = "Buffer Diagnostics (Trouble)", + }, + { + "cs", + "Trouble symbols toggle focus=false", + desc = "Symbols (Trouble)", + }, + { + "cl", + "Trouble lsp toggle focus=false win.position=right", + desc = "LSP Definitions / references / ... (Trouble)", + }, + { + "xL", + "Trouble loclist toggle", + desc = "Location List (Trouble)", + }, + { + "xQ", + "Trouble qflist toggle", + desc = "Quickfix List (Trouble)", + }, + }, + opts = { + use_diagnostic_signs = true, + }, + }, + { -- todo comments + "https://github.com/folke/todo-comments.nvim", + dependencies = { + "https://github.com/nvim-lua/plenary.nvim", + }, + cmd = { "TodoTrouble", "TodoTelescope" }, + event = "BufReadPost", + keys = { + { + "]t", + function() + require("todo-comments").jump_next() + end, + desc = "next todo comment", + }, + { + "[t", + function() + require("todo-comments").jump_prev() + end, + desc = "previous todo comment", + }, + { + "xt", + "TodoTrouble", + desc = "todo (trouble)" + }, + { + "xT", + "TodoTelescope", + desc = "todo (telescope)" + }, + }, + config = true, + }, { -- better folding "https://github.com/kevinhwang91/nvim-ufo", dependencies = {