diff --git a/.config/nvim/lua/josean/plugins/telescope.lua b/.config/nvim/lua/josean/plugins/telescope.lua index 9664a37..59e80de 100644 --- a/.config/nvim/lua/josean/plugins/telescope.lua +++ b/.config/nvim/lua/josean/plugins/telescope.lua @@ -13,7 +13,7 @@ return { local transform_mod = require("telescope.actions.mt").transform_mod local trouble = require("trouble") - local trouble_telescope = require("trouble.providers.telescope") + local trouble_telescope = require("trouble.sources.telescope") -- or create your custom action local custom_actions = transform_mod({ @@ -30,7 +30,7 @@ return { [""] = actions.move_selection_previous, -- move to prev result [""] = actions.move_selection_next, -- move to next result [""] = actions.send_selected_to_qflist + custom_actions.open_trouble_qflist, - [""] = trouble_telescope.smart_open_with_trouble, + [""] = trouble_telescope.open, }, }, }, diff --git a/.config/nvim/lua/josean/plugins/trouble.lua b/.config/nvim/lua/josean/plugins/trouble.lua index 62e1527..6de76ac 100644 --- a/.config/nvim/lua/josean/plugins/trouble.lua +++ b/.config/nvim/lua/josean/plugins/trouble.lua @@ -1,12 +1,15 @@ return { "folke/trouble.nvim", dependencies = { "nvim-tree/nvim-web-devicons", "folke/todo-comments.nvim" }, + opts = { + focus = true, + }, + cmd = "Trouble", keys = { - { "xx", "TroubleToggle", desc = "Open/close trouble list" }, - { "xw", "TroubleToggle workspace_diagnostics", desc = "Open trouble workspace diagnostics" }, - { "xd", "TroubleToggle document_diagnostics", desc = "Open trouble document diagnostics" }, - { "xq", "TroubleToggle quickfix", desc = "Open trouble quickfix list" }, - { "xl", "TroubleToggle loclist", desc = "Open trouble location list" }, - { "xt", "TodoTrouble", desc = "Open todos in trouble" }, + { "xw", "Trouble diagnostics toggle", desc = "Open trouble workspace diagnostics" }, + { "xd", "Trouble diagnostics toggle filter.buf=0", desc = "Open trouble document diagnostics" }, + { "xq", "Trouble quickfix toggle", desc = "Open trouble quickfix list" }, + { "xl", "Trouble loclist toggle", desc = "Open trouble location list" }, + { "xt", "Trouble todo toggle", desc = "Open todos in trouble" }, }, }