add find keymaps

This commit is contained in:
MFlossmann 2024-07-13 11:14:17 +02:00
parent f76b553076
commit 1ca9e8e016

View file

@ -37,16 +37,15 @@
# └──────────────────────────────────────────────────┘
extraConfigLuaPre = ''
local telescopeWithArgs = function(fn, args, extension)
-- args.layout_config = {
-- anchor = "N",
-- mirror = true,
-- width = 0.8,
-- }
args.layout_config = {
anchor = "N",
mirror = true,
width = 0.8,
}
-- if fn == "keymaps" or fn == "registers" then args.layout_config.height = function(_, _, max_lines) return max_lines end end
if fn == "keymaps" or fn == "registers" then args.layout_config.height = function(_, _, max_lines) return max_lines end end
-- local args_with_theme = require("telescope.themes").get_dropdown(args)
local args_with_theme = args
local args_with_theme = require("telescope.themes").get_dropdown(args)
if extension ~= "" then
require("telescope").extensions[extension][fn](args_with_theme)
@ -109,7 +108,7 @@
fn = "live_grep";
}
{
desc = "Find help tags";
desc = "Find help";
key = "<leader>fh";
fn = "help_tags";
}
@ -130,14 +129,33 @@
}
{
desc = "Find word under cursor";
key = "<leader>fw";
key = "<leader>f*";
fn = "grep_string";
}
{
desc = "Search references";
key = "gr";
key = "<leader>lR";
fn = "lsp_references";
}
{
desc = "Find marks";
key = "<leader>f'";
fn = "marks";
}
{
desc = "Find commands";
key = "<leader>fC";
fn = "commands";
}
{
desc = "Find themes";
key = "<leader>ft";
fn = "colortheme";
args = {
enable_preview = true;
ignore_builtins = true;
};
}
];
};
}