mirror of
https://github.com/boxpositron/absolute-vim.git
synced 2026-02-28 19:50:38 +00:00
The key mappings in the telescope.lua file have been refactored to use the new mappings syntax introduced in the latest version of Telescope. Additionally, support for the trouble.nvim plugin has been added by mapping the `<C-q>` key to the `trouble.open_with_trouble` function in both insert and normal mode. This allows for easier navigation and troubleshooting within Telescope.
24 lines
746 B
Lua
24 lines
746 B
Lua
local telescope = require("telescope")
|
|
local builtin = require("telescope.builtin")
|
|
local trouble = require("trouble.providers.telescope")
|
|
|
|
telescope.setup({
|
|
defaults = {
|
|
mappings = {
|
|
i = {
|
|
["<C-q>"] = trouble.open_with_trouble,
|
|
},
|
|
n = {
|
|
["<C-q>"] = trouble.open_with_trouble,
|
|
},
|
|
},
|
|
},
|
|
})
|
|
|
|
vim.keymap.set("n", "<leader>pf", builtin.find_files, { desc = "Fuzzy find files in cwd" })
|
|
vim.keymap.set("n", "<leader>pr", builtin.oldfiles, { desc = "Fuzzy find recent files" })
|
|
vim.keymap.set("n", "<C-p>", builtin.git_files, { desc = "Fuzzy find files in git in cwd" })
|
|
vim.keymap.set("n", "<leader>ps", function()
|
|
builtin.grep_string({ search = vim.fn.input("Grep > ") })
|
|
end, { desc = "Find string under cursor in cwd" })
|