diff options
| author | triethyl <triethylammonium@pm.me> | 2025-10-15 08:39:50 -0400 |
|---|---|---|
| committer | triethyl <triethylammonium@pm.me> | 2025-10-15 08:39:50 -0400 |
| commit | d8b63b8cb6dbc0defec3d535a8bb002e211c7fae (patch) | |
| tree | 3a38d573a827579afa7fe6adab9bf68c1f53a83b /pkgs | |
| parent | 87062b75e49e3850db0d5b11ac4ed6b08ca16d4b (diff) | |
neovim: remove neo-tree and add dir picker
Diffstat (limited to 'pkgs')
| -rw-r--r-- | pkgs/custom-neovim/config/lua/keymaps.lua | 17 | ||||
| -rw-r--r-- | pkgs/custom-neovim/config/lua/plugins/neo-tree.lua | 9 | ||||
| -rw-r--r-- | pkgs/custom-neovim/default.nix | 2 | ||||
| -rw-r--r-- | pkgs/custom-neovim/todo.md | 1 |
4 files changed, 18 insertions, 11 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 -} diff --git a/pkgs/custom-neovim/default.nix b/pkgs/custom-neovim/default.nix index f58ac1c..85cd5b9 100644 --- a/pkgs/custom-neovim/default.nix +++ b/pkgs/custom-neovim/default.nix @@ -35,9 +35,7 @@ in mini-extra mini-icons plenary-nvim # UI library - nui-nvim # Other UI library actions-preview-nvim # Preview lsp actions - neo-tree-nvim # Completion Plugins blink-cmp diff --git a/pkgs/custom-neovim/todo.md b/pkgs/custom-neovim/todo.md index 48c0b7e..5045ef4 100644 --- a/pkgs/custom-neovim/todo.md +++ b/pkgs/custom-neovim/todo.md @@ -1,5 +1,6 @@ # Todo +- make directory search cd picker - make normal keybinds override calendar keybinds - make <esc> hide lsp hover from K - add window layout presets |
