diff options
| author | 2025-05-02 16:05:47 +0300 | |
|---|---|---|
| committer | 2025-05-02 16:05:47 +0300 | |
| commit | 446d2716e7bb83e58fb516ec27e5c7750069e98c (patch) | |
| tree | 3e2bdee9d79cf8495fde84a559d2b05bf7ca45b8 /nvim/lua/plugins/tree.lua | |
| parent | Сделал кейбинды (diff) | |
| download | dotfiles-446d2716e7bb83e58fb516ec27e5c7750069e98c.tar.gz dotfiles-446d2716e7bb83e58fb516ec27e5c7750069e98c.tar.bz2 dotfiles-446d2716e7bb83e58fb516ec27e5c7750069e98c.tar.xz dotfiles-446d2716e7bb83e58fb516ec27e5c7750069e98c.zip | |
Перешел на lazy nvim, навел порядок в плагинах
Diffstat (limited to '')
| -rw-r--r-- | nvim/lua/plugins/tree.lua | 68 |
1 files changed, 46 insertions, 22 deletions
diff --git a/nvim/lua/plugins/tree.lua b/nvim/lua/plugins/tree.lua index 320849b..4807024 100644 --- a/nvim/lua/plugins/tree.lua +++ b/nvim/lua/plugins/tree.lua @@ -1,27 +1,51 @@ -require("nvim-tree").setup({ - sort = { - sorter = "case_sensitive", +return { + "nvim-tree/nvim-tree.lua", + dependencies = { + "nvim-tree/nvim-web-devicons", }, - view = { - width = 30, - }, - git = { - enable = true, - }, - renderer = { - group_empty = true, - highlight_git = true, - icons = { - show = { - git = true, + opts = { + hijack_directories = { + enable = true, -- Перехватывать открытие директорий + auto_open = true, -- Автоматически открывать при старте + }, + sort = { + sorter = "case_sensitive", + }, + view = { + width = 30, + }, + git = { + enable = true, + }, + renderer = { + group_empty = true, + highlight_git = true, + icons = { + show = { + git = true, + }, }, }, + filters = { + dotfiles = false, + }, + update_focused_file = { + enable = true, + update_root = false, + }, }, - filters = { - dotfiles = false, - }, - update_focused_file = { - enable = true, - update_root = false, + keys = { + { + "<C-c>", + function() + local api = require("nvim-tree.api") + local global_cwd = vim.fn.getcwd(-1, -1) + api.tree.change_root(global_cwd) + end, + noremap = true, + silent = true, + desc = "Change tree root to CWD", + }, + { "<F3>", ":NvimTreeToggle<CR>", noremap = true, silent = true, desc = "Toggle file tree" }, }, -}) +} |
