summaryrefslogtreecommitdiff
path: root/pkgs/custom-neovim/config/lua
diff options
context:
space:
mode:
authortriethyl <triethylammonium@pm.me>2025-10-15 08:39:50 -0400
committertriethyl <triethylammonium@pm.me>2025-10-15 08:39:50 -0400
commitd8b63b8cb6dbc0defec3d535a8bb002e211c7fae (patch)
tree3a38d573a827579afa7fe6adab9bf68c1f53a83b /pkgs/custom-neovim/config/lua
parent87062b75e49e3850db0d5b11ac4ed6b08ca16d4b (diff)
neovim: remove neo-tree and add dir picker
Diffstat (limited to 'pkgs/custom-neovim/config/lua')
-rw-r--r--pkgs/custom-neovim/config/lua/keymaps.lua17
-rw-r--r--pkgs/custom-neovim/config/lua/plugins/neo-tree.lua9
2 files changed, 17 insertions, 9 deletions
diff --git a/pkgs/custom-neovim/config/lua/keymaps.lua b/pkgs/custom-neovim/config/lua/keymaps.lua
index e3502fe..fc927b0 100644
--- a/pkgs/custom-neovim/config/lua/keymaps.lua
+++ b/pkgs/custom-neovim/config/lua/keymaps.lua
@@ -17,6 +17,23 @@ mapkey("n", "<leader>o", "Open old file picker", ":Pick oldfiles<cr>", "mini.pic
mapkey("n", "<leader>/", "Open live grep picker", ":Pick grep_live<cr>", "mini.pick")
mapkey("n", "<leader>k", "Open colorscheme picker", ":Pick colorschemes<cr>", "mini.pick")
mapkey("n", "<leader>z", "Open zoxide picker", ":Zi<cr>", "zoxide.vim")
+mapkey("n", "<leader>l", "Open directory picker", function ()
+ local dirstr = vim.fn.system("fd -t d")
+
+ local pos,dirtbl = 0,{}
+ for st,sp in function() return string.find(dirstr, "\n", pos, true) end do
+ table.insert(dirtbl, string.sub(dirstr, pos, st - 1))
+ pos = sp + 1
+ end
+ table.insert(dirtbl, string.sub(dirstr, pos))
+ vim.ui.select(
+ dirtbl,
+ {},
+ function (choice)
+ vim.cmd.tcd(choice)
+ end
+ )
+end, "mini.pick")
-- File manager
mapkey("n", "<leader>e", "Open file manager", ":lua MiniFiles.open()<cr>", "mini.files")
diff --git a/pkgs/custom-neovim/config/lua/plugins/neo-tree.lua b/pkgs/custom-neovim/config/lua/plugins/neo-tree.lua
deleted file mode 100644
index 572df49..0000000
--- a/pkgs/custom-neovim/config/lua/plugins/neo-tree.lua
+++ /dev/null
@@ -1,9 +0,0 @@
-return {
- "neo-tree.nvim",
- lazy = true,
- cmd = "Neotree";
- before = function ()
- vim.cmd.packadd("plenary.nvim")
- vim.cmd.packadd("nui.nvim")
- end
-}