Add Kulala keymappings and add fallback from git files picker

This commit is contained in:
Fábio André Damas 2025-08-06 18:43:15 +01:00
parent 358526bdb5
commit cab57473b7
3 changed files with 24 additions and 6 deletions

View file

@ -19,7 +19,18 @@ return {
{ "<c-\\>", "<cmd>Commander<cr>", desc = "Commander" },
{ "<C-p>", ":lua Snacks.picker.git_files()<cr>", desc = "Find git files" },
{
"<C-p>",
function()
local git_root = Snacks.git.get_root()
if git_root then
Snacks.picker.git_files()
else
Snacks.picker.files()
end
end,
desc = "Find git files"
},
{ ",", group = "Search" },
{ ",p", ":lua Snacks.picker.files()<cr>", desc = "Files files" },
@ -44,7 +55,6 @@ return {
"<leader>ds",
function()
local function pick_cmd_result(picker_opts)
local git_root = Snacks.git.get_root()
local function finder(opts, ctx)
return require("snacks.picker.source.proc").proc({
opts,
@ -83,6 +93,11 @@ return {
end,
desc = "Search dot files 🔭",
},
{
-- this only works on http files
"<leader>R",
desc = "Kulala HTTP"
},
{ "K", "<cmd>Lspsaga hover_doc<cr>", desc = "Show documentation" },
{ "<C-k>", "<cmd>Lspsaga hover_doc ++keep<cr>", desc = "Show documentation (keep)" },