mirror of
https://github.com/josean-dev/dev-environment-files.git
synced 2025-01-08 17:21:23 +01:00
Added keymaps to telescope to open items as well as selected quick fix list in trouble
This commit is contained in:
parent
ee0bcf9b5f
commit
b2876885b9
1 changed files with 13 additions and 1 deletions
|
@ -10,6 +10,17 @@ return {
|
||||||
config = function()
|
config = function()
|
||||||
local telescope = require("telescope")
|
local telescope = require("telescope")
|
||||||
local actions = require("telescope.actions")
|
local actions = require("telescope.actions")
|
||||||
|
local transform_mod = require("telescope.actions.mt").transform_mod
|
||||||
|
|
||||||
|
local trouble = require("trouble")
|
||||||
|
local trouble_telescope = require("trouble.providers.telescope")
|
||||||
|
|
||||||
|
-- or create your custom action
|
||||||
|
local custom_actions = transform_mod({
|
||||||
|
open_trouble_qflist = function(prompt_bufnr)
|
||||||
|
trouble.toggle("quickfix")
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
telescope.setup({
|
telescope.setup({
|
||||||
defaults = {
|
defaults = {
|
||||||
|
@ -18,7 +29,8 @@ return {
|
||||||
i = {
|
i = {
|
||||||
["<C-k>"] = actions.move_selection_previous, -- move to prev result
|
["<C-k>"] = actions.move_selection_previous, -- move to prev result
|
||||||
["<C-j>"] = actions.move_selection_next, -- move to next result
|
["<C-j>"] = actions.move_selection_next, -- move to next result
|
||||||
["<C-q>"] = actions.send_selected_to_qflist + actions.open_qflist,
|
["<C-q>"] = actions.send_selected_to_qflist + custom_actions.open_trouble_qflist,
|
||||||
|
["<C-t>"] = trouble_telescope.smart_open_with_trouble,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue