save
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user