This commit is contained in:
2026-06-06 07:10:56 -04:00
parent ae65809dd0
commit f6bf31d341
4 changed files with 51 additions and 21 deletions

View File

@@ -15,6 +15,26 @@ end
keymap("n", "<leader>f", ":Pick files<CR>")
keymap("n", "<leader>g", ":Pick grep_live<CR>")
vim.keymap.set('n', '<leader>p', function()
local root = vim.fn.expand("~/programming")
local items = vim.fn.globpath(root, '*', false, true)
local dirs = {}
for _, p in ipairs(items) do
if vim.fn.isdirectory(p) == 1 then table.insert(dirs, p) end
end
if #dirs == 0 then
vim.notify('No directories in ' .. root, vim.log.levels.INFO)
return
end
vim.ui.select(dirs, { prompt = 'Pick dir:' }, function(choice)
if not choice then return end
vim.cmd('cd ' .. vim.fn.fnameescape(choice))
vim.notify('cd -> ' .. choice, vim.log.levels.INFO)
end)
end)
keymap("n", "<leader>lf", vim.lsp.buf.format)
keymap({ "n", "t" }, "<C-/>", function()