Commit Graph

39 Commits

Author SHA1 Message Date
Igor Lacerda
cf18a662cd feat: experiment: restore nvim-tree on session load, see https://github.com/nvim-tree/nvim-tree.lua/issues/3343 (#3335)
* feat: restore buffers after loading a session

* feat(sessions): invalid json handling

* feat(sessions): switch to "persist in a file" strategy

* docs: no longer needs to toggle sessionoptions flag

---------

Co-authored-by: Alexander Courtis <alex@courtis.org>
2026-07-10 11:27:15 +10:00
Alexander Courtis
7adc5679fe feat(#3310): minimum neovim version 0.10 (#3311)
* feat(#3310): minimum neovim version 0.10

* feat(#3310): minimum neovim version 0.10

* feat(#3310): minimum neovim version 0.10

* feat(#3310): minimum neovim version 0.10

* feat(#3310): minimum neovim version 0.10

* feat(#3310): minimum neovim version 0.10

* feat(#3310): minimum neovim version 0.10

* feat(#3310): minimum neovim version 0.10
2026-04-07 10:37:49 +10:00
Alexander Courtis
31503ad5d8 perf(#3231): decrease setup time: optimise setup and defer requires until tree open (#3308)
* perf(#3257): remove devicons setup

* perf(#3257): remove padding setup

* perf(#3257): remove appearance and log setup

* perf(#3257): remove appearance setup

* perf(#3257): remove rename-file setup

* perf(#3257): remove devicons setup

* perf(#3257): remove appearance setup

* perf(#3257): inline require legacy notify

* perf(#3257): inline require events notify

* perf(#3257): inline require log notify

* perf(#3253): extract change-root

* perf(#3253): extract open_on_directory

* perf(#3253): extract tab_enter

* perf(#3253): move requires inline

* perf(#3253): extract au find-file, view

* perf(#3253): extract manage_netrw

* perf(#3253): extract purge_all_state and document

* perf(#3253): move full-name setup_autocommands to main

* perf(#3253): unextract au find-file for laziness

* perf(#3253): short-circuit open_on_directory au

* perf(#3253): extract autocmd

* perf(#3253): move all setup requires inside the function
2026-04-02 13:33:16 +11:00
Alexander Courtis
3603f069ff perf(#3257): remove setup for renderer, log, appearance (#3307)
* perf(#3257): remove devicons setup

* perf(#3257): remove padding setup

* perf(#3257): remove appearance and log setup

* perf(#3257): remove appearance setup

* perf(#3257): remove rename-file setup

* perf(#3257): remove devicons setup

* perf(#3257): remove appearance setup

* perf(#3257): inline require legacy notify

* perf(#3257): inline require events notify

* perf(#3257): inline require log notify
2026-03-31 12:21:08 +11:00
Alexander Courtis
ec0efb06b0 fix(#3301): setup with empty config fails (#3303) 2026-03-28 13:06:40 +11:00
Alexander Courtis
43a3bb4b26 perf(#3257): remove setup for actions modules, full-name and explorer (#3299)
* perf(#3257): remove remove-file setup

* perf(#3257): remove rename-file setup

* perf(#3257): remove trash setup

* perf(#3257): remove actions.fs init

* perf(#3257): remove file-popup setup

* perf(#3257): remove open-file setup

* perf(#3257): remove system-open setup

* perf(#3257): remove open-file setup

* perf(#3257): remove actions.node init

* perf(#3257): remove change-dir setup

* perf(#3257): remove find-file setup

* perf(#3257): remove open setup

* perf(#3257): remove toggle setup

* perf(#3257): remove resize setup

* perf(#3257): remove finders init

* perf(#3257): remove moves init

* perf(#3257): remove tree init

* perf(#3257): remove explorer setup

* perf(#3257): view uses config.g

* perf(#3257): move os from utils to config, removing requires

* perf(#3257): move os from utils to config, removing requires

* perf(#3257): move os from utils to config, removing requires

* perf(#3257): remove watch setup

* perf(#3257): remove notify setup

* perf(#3257): remove full-name setup

* perf(#3257): remove padding setup

* Revert "perf(#3257): remove padding setup"

This reverts commit 862db0366b.
2026-03-28 11:21:57 +11:00
Alexander Courtis
6eaf74c991 feat(#3292): add nvim_tree.config.filesystem_watchers.whitelist_dirs - strongly recommended for windows (#3298)
* feat(#3292): add nvim_tree.config.filesystem_watchers.whitelist_dirs

* feat(#3292): add nvim_tree.config.filesystem_watchers.whitelist_dirs

* feat(#3292): add nvim_tree.config.filesystem_watchers.whitelist_dirs
2026-03-26 10:40:03 +11:00
Alexander Courtis
3d385d3346 perf(#3257): remove setup for modules: buffers, diagnostics, git, help, keymap, lib, watcher (#3295)
* perf(#3257): remove keymap setup

* perf(#3257): remove diagnostics setup

* perf(#3257): remove diagnostics setup

* perf(#3257): remove help setup

* perf(#3257): remove help setup

* perf(#3257): remove watcher setup

* perf(#3257): remove buffers setup

* perf(#3257): remove lib setup

* perf(#3257): remove git setup

* perf(#3257): remove git utils setup

* perf(#3257): remove buffers setup
2026-03-24 10:42:27 +11:00
Alexander Courtis
ae16aab5fd refactor(#3256): move setup/config related functionality to new module config.lua (#3262)
* refactor(#3253): move setup/config related functionality to new module config.lua

* refactor(#3253): add api.config, tidy new config module

* refactor(#3253): add api.config, tidy new config module

* refactor(#3253): add api.config, tidy new config module

* refactor(#3253): format

* refactor(#3256): fix doc generator

* refactor(#3256): fix doc generator

* refactor(#3256): strongly type legacy config

* refactor(#3256): legacy config consistent parameter naming

* refactor(#3256): fix bad rebase
2026-02-25 13:18:42 +11:00
Alexander Courtis
18c7a31198 chore: remove legacy view.mappings.list (#2371) 2023-08-14 17:41:55 +10:00
Alexander Courtis
362ecbeed6 fix(#2024): revert removal of deprecated nvim-tree.config nvim_tree_callback 2023-02-28 09:10:13 +11:00
Alexander Courtis
74959750f7 feat: automated migration from view.mappings.list to on_attach, see https://github.com/nvim-tree/nvim-tree.lua/wiki/Migrating-To-on_attach (#1579)
* chore(mappings): migrate legacy mappings under the hood

* chore(mappings): POC for help and :help on_attach keymaps

* chore(mappings): POC for help and :help on_attach keymaps

* chore(mappings): add desc to all mappings, show in help, reformat help

* chore(mappings): add desc to all mappings

* chore(mappings): add desc to all mappings

* chore(mappings): escape help keys

* chore(mappings): migrate legacy mappings under the hood: map keymap to legacy mappings

* chore(mappings): migrate legacy mappings under the hood: remove dispatch

* Revert "chore(mappings): migrate legacy mappings under the hood: remove dispatch"

This reverts commit f6f439ba59.

* chore(mappings): migrate legacy mappings under the hood: pass node to action_cb

* chore(mappings): migrate legacy mappings under the hood: remove dispatch

* chore(mappings): migrate legacy mappings under the hood: replace mappigns with keymaps in help

* chore(mappings): generate on_attach from user's legacy mappings

* chore(mappings): generate on_attach from user's legacy mappings

* chore(mappings): merge cleanup

* chore(mappings): use default mappings when on_attach not present, log legacy migration

* on_attach is default or user only, legacy and generation includes defaults (#1777)

* chore(mappings): remove mappings via vim.keymap.del instead of filtering mappings, to allow for multiple ways of specifying a key

* doc: specify that the terminal emulator must be configured to use the patched font

* feat(renderer): add NvimTreeOpenedFolderIcon NvimTreeClosedFolderIcon (#1768)

* feat: Add highlight group for opened folder

closes #1674

* docs: Add NvimTreeOpenedFolderIcon default

* feat: Add NvimTreeClosedFolderIcon highlight group

Defaults to NvimTreeFolderIcon

* feat: add diagnostics.show_on_open_dirs git.show_on_open_dirs (#1778)

* feat(diagnostics): only show diagnostic on closed folder

* feat(git): only show git icon on closed folder

* docs: Update feature_request.md (#1788)

* Update feature_request.md

Closes #1654

* Update feature_request.md

Co-authored-by: Alexander Courtis <alex@courtis.org>

* 1786 git next prev land on dirs (#1787)

* Filtered dir with git status that are open when show_on_open_dir is false

* refactored for single source of truth of existence of git status on a node

Putting `has_git_status()` in `explorer.common` because that's where node.status is constructed
Or at least I think that's where it's constructed

* 1786 semantic nit

Co-authored-by: Alexander Courtis <alex@courtis.org>

* fix(git): git rename not showing up for the renamed file (#1783)

* fixed git rename not showing up for the renamed file

* considered " -> " being a part of the filename

Fixed -> pattern to escape -
Fixed "\"" and "\\" in filename

* using string.find(, , true) to match plain ->

* Using -z and removed unnecessary logic

* feat(view): always enable cursorline, users may change this behaviour via Event.TreeOpen (#1814)

* Update view.lua

* set cursorline to true

* feat(event): dispatch Event.NodeRenamed on cut-paste (#1817)

* feat(view): add filters.git_clean, filters.no_buffer (#1784)

* feat(view): add filters.git_clean

* feat(view): add filters.git_clean

* feat(view): add filters.no_buffer

* feat(view): filters.no_buffer misses unloaded, handles buffer in/out

* feat(view): filters.no_buffer matches directories specifically

* feat(view): filters.no_buffer clarify targets

* feat: add placeholder filters.diagnostics_ok, refactor filters

* feat(view): remove placeholder filters.diagnostics_ok

* doc: consolidate and clarify :help examples

* doc: format help

* feat: paste and create always target closed folder, remove create_in_closed_folder (#1802)

* Fix default for file creation in closed directories

* Make paste in closed directories consistent with create

* doc: clarify create_in_closed_folder

* Remove create_in_closed_folder option

* doc: clarify create_in_closed_folder removal message (whoops)

Co-authored-by: Alexander Courtis <alex@courtis.org>

* on_attach is user's or default, nothing else; legacy generated on_attach includes defaults

Co-authored-by: baahrens <bahrens@compeon.de>
Co-authored-by: Richard Li <38484873+chomosuke@users.noreply.github.com>
Co-authored-by: gegoune <69750637+gegoune@users.noreply.github.com>
Co-authored-by: rishabhjain9191 <rishabh.jain9191@gmail.com>
Co-authored-by: Anton <14187674+antosha417@users.noreply.github.com>
Co-authored-by: Eric Haynes <ehaynes99@gmail.com>

* on_attach_default hardcoded

* format default_on_attach

* source default on_attach directly

* remove human mappings help

* simplified on_attach generation

* simplified on_attach generation

* generate default on_attach

* generate default on_attach

* split out keymap_legacy

* add recently introduced mappings

* legacy api.config.mappings.active and default

* legacy api.config.mappings.active and default

* on_attach help and readme

* legacy generate handles action = ""

* legacy generate handles action =

* legacy generate gives defaults when no user mappings

* legacy generate handles action = ""

* legacy generate api handles overrides

* legacy generate handles subsequent setup, on_attach retains deep copies of legacy config

* add wiki link to generated on_attach

* add opts helper function for on_attach, prefixing 'nvim-tree: '

---------

Co-authored-by: kiyan <yazdani.kiyan@protonmail.com>
Co-authored-by: baahrens <bahrens@compeon.de>
Co-authored-by: Richard Li <38484873+chomosuke@users.noreply.github.com>
Co-authored-by: gegoune <69750637+gegoune@users.noreply.github.com>
Co-authored-by: rishabhjain9191 <rishabh.jain9191@gmail.com>
Co-authored-by: Anton <14187674+antosha417@users.noreply.github.com>
Co-authored-by: Eric Haynes <ehaynes99@gmail.com>
2023-02-27 14:19:50 +11:00
kiyan
7087af83f3 fix(keypress): use <cmd> instead of : to avoid triggering CmdLineEnter
fixes #1417
2022-07-14 09:33:19 +02:00
kiyan
63831d5179 refactor(actions): move on_keypress to dispatch module 2022-07-09 11:43:58 +02:00
kiyan
4fc9cb1da3 chore: move code around
- deprecate config.lua file
- move icon config code into renderer/icons
- move file opening config in open-file.lua
2022-02-09 22:26:02 +01:00
kiyan
2b2bf0721d refacto: move keypress to actions/init 2022-01-21 12:07:54 +01:00
Carlos Coves Prieto
fa8bb09de4 custom node keymaps (#855) 2022-01-21 11:03:49 +01:00
Kiyan
6662b60a2b feat/chore: rewrite git with job and some other fixes (#743)
* feat/chore: rewrite git with job and some other fixes

* fix: fs clear window, rename echo_warning -> warn

also fix renaming and add an event blocker to avoid running many events
at the same time
2021-11-27 16:02:54 +01:00
kiyan
53856f5d3a fix: remove lsp icons for loading in config 2021-10-10 15:48:23 +02:00
kiyan
94b8604e86 chore: complete the diagnostic setup migration
Colors groups and icons are now in diagnostics.lua. They are defined on
setup which allows an easier configuration and better documentation.
`lsp_diagnostics` boolean value has been moved into a table `diagnostics`
with `enable` and `icons` as properties.
2021-10-10 11:42:22 +02:00
gzygmanski
385f8c89e0 feat: show default file icon when nvim-devicon is not installed (#696) 2021-10-08 21:53:31 +02:00
Kiyan
6f8dc1d41c Revert "add icons for default and symlink (#649)" (#706)
This reverts commit 34af2d22ad.
2021-10-08 19:33:55 +02:00
kiyan
fb32f35d7f chore: allow configuring height
also fixes window management for top and bottom tree side
2021-10-03 14:13:10 +02:00
Vikas Raj
34af2d22ad add icons for default and symlink (#649) 2021-09-30 12:09:08 +02:00
Kiyan
a864b80baf chore: refacto setup part 1 (#603)
* chore: refacto setup part 1

refacto setup for code entrypoint
following options switched boolean values as options to the setup function:
- `nvim_tree_disable_netrw` -> `disable_netrw`
- `nvim_tree_hijack_netrw` -> `hijack_netrw`
- `nvim_tree_auto_open` -> `open_on_setup`
- `nvim_tree_auto_close` -> `auto_close`
- `nvim_tree_tab_open` -> `tab_open`
- `nvim-tree-update-cwd` -> `update_cwd`
- `nvim_tree_hijack_cursor` -> `hijack_cursor`
- `nvim_tree_system_open_command` -> `system_open.cmd`
- `nvim_tree_system_open_command_args` -> `system_open.args`
- `nvim_tree_follow` -> `update_focused_file.enable`
- `nvim_tree_follow_update_path` -> `update_focused_file.update_cwd`
Also added new option `update_focused_file.ignore_list` which will
ignore filepath or filetypes that matches one entry of the list when
updating the path if update_cwd is true.

* add deprecation warning

* update readme

* schedule on enter to avoid running before vim first buffer has loaded

* update docs

* correct typo

* rename tab open -> open on tab
2021-09-25 16:43:39 +02:00
gegoune
d7f73b5ae9 feat(config): add notify to nvim_tree_window_picker_exclude (#613) 2021-09-12 14:31:31 +02:00
Kiyan
a80ea23b4c fix ci (#477) 2021-06-29 23:13:28 +02:00
Kiyan
d51ed722ed add small arrows before folders (#427) 2021-06-02 18:45:25 +02:00
Sindre T. Strøm
9aed1acb47 fix: Gitignore rules not being applied on new nodes. (#415) 2021-05-31 09:12:59 +02:00
Sindre T. Strøm
23935ff003 feat: Option for excluding buffers from the window picker. (#401) 2021-05-27 09:19:10 +02:00
Sindre T. Strøm
624bec7ecd refactor: open_file (#345) 2021-05-17 22:13:30 +02:00
Sindre T. Strøm
da09da3318 feat(diagnostics): More responsive and configurable diagnostics signs. (#303) 2021-04-16 17:57:16 +02:00
Kiyan
ff814676d5 chore: rewrite buffer/window handling into view file (#287) 2021-04-13 23:54:01 +02:00
Sindre T. Strøm
50d31fb7f3 feat: Highlight gitignored files (and fix g:nvim_tree_gitignore) (#268) 2021-04-08 22:52:56 +02:00
Carlos Afonso
de93da78a9 Feat/add advanced navigation (#257) 2021-04-03 00:38:28 +02:00
yamatsum
1e946c5855 feat: add option for changing symlink opened folder. (#242) 2021-03-22 17:34:30 +01:00
kiyan42
58e44d29d7 chore: update documentation for tree mappings 2021-03-06 12:49:30 +01:00
kiyan
905afba209 chore: refacto binding initialization (inverse mapping table) 2021-02-23 00:31:47 +01:00
kiyan
0136801444 chore: rename lib folder to nvim-tree
Allows external access to the lua api and follow neovim plugins better
practices
2021-02-22 21:02:23 +01:00