neovim: add mappings for quickfix

This commit is contained in:
2023-08-31 17:22:50 +03:00
parent 7bbadc003a
commit ceb2ac3de8
2 changed files with 15 additions and 0 deletions

View File

@@ -24,3 +24,14 @@ vim.keymap.set("n", "tn", ":tabnew<CR>")
vim.keymap.set("n", "tN", ":-tabnew<CR>")
vim.keymap.set("n", "H", ":tabprev<CR>")
vim.keymap.set("n", "L", ":tabnext<CR>")
-- quickfix
vim.keymap.set("n", "<C-q><C-q>", function()
if vim.bo.ft == "qf" then
vim.cmd(":cclose")
else
vim.cmd(":copen")
end
end)
vim.keymap.set("n", "<C-q>n", vim.cmd.cnext)
vim.keymap.set("n", "<C-q>N", vim.cmd.cprevious)

View File

@@ -13,9 +13,13 @@ telescope.setup({
["<C-j>"] = actions.move_selection_worse,
["<C-k>"] = actions.move_selection_better,
["<C-p>"] = layout_actions.toggle_preview,
["<C-x>"] = actions.add_selected_to_qflist,
["<C-t>"] = actions.toggle_selection,
},
n = {
["<C-p>"] = layout_actions.toggle_preview,
["<C-x>"] = actions.add_selected_to_qflist,
["<C-t>"] = actions.toggle_selection,
},
},
},