Commit Graph

463 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
Uanela Como
c760c92667 feat(#1549): p will paste files from another nvim-tree instance, gp will cut/paste (#3336)
* feat: add copy absolute path with protocol into public api

* feat: add helper get_basename into node

* feat: add gby keymap, and allow visual mode for copy.basename|absolute_path

* feat(clipboard): add opts for adding protocol in reg operations

* feat(api): allow visual operation in absolute_path*

* feat: add paste with protocol to keymap+api

* feat: add paste with protocol to clipboard

* feat: add configurable clipboard protocol

* fix: filter descendant nodes on copy_absolute_path_with_protocol

* refactor: change clip protocol keymaps to bgy and bgp

* wip

* fix(clipboad): correctly show the number of copied nodes on bgy

* chore: remove bgy, bgp and add gp + gx

* chore: update api/fs.lua and api impl.lua to match new keymaps

* fix: correctly pass the function to new keymaps

* chore: remove use_protocol and use use_register + cut options

* chore: update docs

* chore: move node:get_basename to cliboard_

* chore(clipboard): remove vim.cmd workaround in favor of vim.fn.setreg

* chore: use newline as separator instead of comma

* refactor(clipboard): simplify copying node attribute and allow all to work in visual mode

* refactor(keymap): remove gx, use gp to move

* feat(clipboard): always copy/cut to register and make `p` pick local data or register data

* refactor(docs): update api docs and rename paste_while_cutting to move

* fix: correctly format keymaps

* chore: regenerate docs

* fix: remove unused apis

* chore: copy clipboard.data to register on copy/cut

* chore: revert copy_node_attribute

* refactor: remove visual mode from copy.basename|filename|path

* chore: update docs

* chore: add fs.move api and update docs

* chore: destroy dummy nodes and prevent empty paths nodes parsing

* fix: _meta/api/fs.lua and docs

* fix(clipboard): destroy dummy nodes from register on paste

* fix(clipboard): correctly check for local paste operation
2026-07-01 10:11:03 +10:00
Alexander Courtis
fb343438d4 docs: generated help fields are sorted as of v0.12.3 (#3337)
* doc: generated help fields are sorted as of v0.12.3

* ci: add weekly trigger for CI job
2026-06-15 12:30:16 +10:00
Sean McCollum
82f58063d6 docs: spelling error (#3333) 2026-06-08 14:32:39 +10:00
Alexander Courtis
07f541fcaa fix(#3327): pass nvim_tree.api.node.open.Opts to all applicable nvim_tree.api.node.open function (#3329)
* fix(#3327): pass nvim_tree.api.node.open.Opts to all applicable nvim_tree.api.node.open function

* fix(#3327): pass nvim_tree.api.node.open.Opts to all applicable nvim_tree.api.node.open function

* fix(#3327): pass nvim_tree.api.node.open.Opts to all applicable nvim_tree.api.node.open function

* fix(#3327): pass nvim_tree.api.node.open.Opts to all applicable nvim_tree.api.node.open function

* fix(#3327): pass nvim_tree.api.node.open.Opts to all applicable nvim_tree.api.node.open function
2026-05-16 08:49:14 +10:00
Alexander Courtis
509962f21a docs: update to 0.12 help format, remove blank line help suppression (#3314)
doc: update to 0.12 help format, remove blank line help suppression
2026-04-07 11:09:12 +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
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
dfeeb12aaa refactor(#3255): all API is lazily loaded (#3287)
* refactor(#3255): wire node.navigate.sibling API impl directly to functions

* refactor(#3255): wire fs.rename API impl directly to functions

* refactor(#3255): wire node.navigate.parent API impl directly to functions

* refactor(#3255): wire remaining node.navigate API impl directly to functions

* refactor(#3255): wire node.open API impl directly to functions, move edit and open_or_expand_or_dir_up to open-file

* refactor(#3255): wire tree.change_root API impl directly to a function in new action module change-dir

* refactor(#3255): lazy post requires, split into formatted groups

* refactor(#3255): all post are lazy

* refactor(#3255): all post are wrapped consistently

* refactor(#3255): all pre are lazy

* refactor(#3255): move Event to meta

* refactor(#3255): ensure all args passed to api

* refactor(#3255): ensure all args passed to api, fix incorrectly documented api interface

* refactor(#3255): ensure all args passed to api, fix incorrectly documented api interface

* refactor(#3255): ensure all args passed to api

* refactor(#3255): add visual mode wrappers

* refactor(#3255): define @enum nvim_tree.api.events.Event

* refactor(#3255): merge api pre and post

* refactor(#3255): merge api pre and post

* refactor(#3255): merge api pre and post
2026-03-20 15:13:24 +11:00
Vlad Ceban
9197f3ee3f feat(#2994): add visual mode operations: copy, cut, delete, trash, toggle bookmark (#3268)
feat(#2994): add visual selection operations
2026-03-13 14:11:48 +11:00
Alexander Courtis
4b30847c91 docs: clarify root_folder_label=false (not true) to disable, tidy nvim_tree_config.renderer help (#3286)
docs: root_folder_label=false to disable, tidy nvim_tree_config.renderer help
2026-03-05 14:07:36 +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
87594aa7c8 fix: allow 0 (unlimited) filesystem_watchers.max_events which is the new default, except for windows at 1000 (#3279) 2026-02-24 17:27:31 +11:00
Uanela Como
5499299746 fix(#3178): handle Windows paths in ignore_dirs and add .zig-cache to defaults (#3261)
* feat: add .zig-cache in default ignored_dirs

* feat: correctly add .zig-cache in default ignored_dirs

* fix(#3178): handle windows paths in ignore_dirs

* fix: remove unsed print statement

* fix: tab formatting

* chore: match with documentation

* chore: double espace backslashes and revert unrelated formatting

* chore: correctly rever unrelated formatting

* chore: indenting explorer/watch

* fix: remove unneeded print

* chore: remove unneeded true check

* chore: adding .zig-cache into nvim-tree.lua

* chore: add /.zig-cache under filesystem_watchers

* chore: regenerate docs
2026-02-23 13:07:24 +11:00
Devansh Sharma
516f95e8ef docs: fix default mappings function name in examples: api.map.on_attach.default (#3269)
docs: fix default mappings function name
2026-02-16 09:48:09 +11:00
Alexander Courtis
1df1960d0e fix(#3265): rename module api.health to api.appearance, to avoid :checkhealth detection (#3266) 2026-02-14 11:17:44 +11:00
Alexander Courtis
2f1010ca77 docs: help links regular-expression instead of vim.regex (#3264)
doc: help: link regular-expression instead of vim.regex
2026-02-13 13:44:18 +11:00
Alexander Courtis
0f4d2d6998 fix: increase filesystem_watchers.max_events from 100 to 1000 (#3263)
* fix: increase filesystem_watchers.max_events from 100 to 1000

* fix: increase filesystem_watchers.max_events from 100 to 1000

* fix: increase filesystem_watchers.max_events from 100 to 1000
2026-02-13 13:37:19 +11:00
Alexander Courtis
118057ebd2 docs(#3241): add api.Decorator and Class meta with generated help, harden decorator rendering, api.decorator.UserDecorator changed to nvim_tree.api.Decorator in a non-breaking manner (#3259)
* doc(#2934): POC to use gen_vimdoc.lua for decorator meta

* doc(#2934): use injected gen_vimdoc.lua from nvim source, move decorators to main help

* doc(#2934): tidy and harden scripts

* doc(#2934): add nvim_tree.Config meta classes, add nvim_tree.api. meta classes

* doc(#2934): add nvim_tree.Config to help

* doc(#2934): add nvim_tree.api classes to help

* doc(#2934): tidy and correct nvim_tree.Config.UI and nvim_tree.Config.Actions

* doc(#2934): tidy and correct nvim_tree.Config.HijackDirectories, format and order nvim_tree.Config

* doc(#2934): tidy and nvim_tree.Config top level

* doc(#2934): tidy and format nvim_tree.Config.LiveFilter, Modified, Tab, Trash

* doc(#2934): tidy and format nvim_tree.Config.FilesystemWatchers, Log

* doc(#2934): split nvim_tree.Config into files, Sort and HijackDirectories populate others placeholder

* doc(#2934): more generic gen_vimdoc_config module config

* doc(#2934): tidy Config.HijackDirectories and Actions, move them into place

* doc(#2934): tidy Config.Modified, move into place

* doc(#2934): tidy Config.LiveFilter, move into place

* doc(#2934): tidy Config.FilesystemWatchers, move into place

* doc(#2934): tidy Config.Trash, move into place

* doc(#2934): tidy Config.Tab, move into place

* doc(#2934): tidy Config.UI, move into place

* doc(#2934): tidy Config.Log, move into place

* doc(#2934): tidy Config.Notify, move into place

* doc(#2934): tidy Config.SystemOpen, move into place

* doc(#2934): tidy Config.Help, move into place

* doc(#2934): tidy Config.Help, move into place

* doc(#2934): tidy Config.Help, move into place

* doc(#2934): tidy Config.Diagnostics, move into place

* doc(#2934): remove api/decorator as they are out of scope, revert api_decorator.lua changes, retain api opts classes but make them exact

* doc(#2934): tidy Config.Filters, move into place

* doc(#2934): tidy Config.FilesystemWatchers, move into place

* doc(#2934): tidy Config.FilesystemWatchers, Git, move into place

* doc(#2934): tidy Config.UpdateFocusedFile, move into place

* doc(#2934): tidy Config.Sort, move into place

* doc(#2934): tidy Config.View, move into place

* doc(#2934): tidy Config.View, move into place

* docs(#2934): type DEFAULT_OPTS, use bracketed references to keep luals happy

* docs(#2934): tidy, inline some classes

* docs(#2934): tidy Config.Renderer

* docs(#2934): remove problematic glyphs, tidy other glyphs

* docs(#2934): tidy Config.Renderer, ensure functions are parenthesised when necessary

* docs(#2934): tidy Config.Renderer

* docs(#2934): tidy Config.Renderer, move into place

* docs(#2934): tidy Config.Renderer

* docs(#2934): tidy Config.FilesystemWatchers

* docs(#2934): fix broken links

* docs(#2934): fix broken links

* docs(#2934): fix broken links

* docs(#2934): fix broken links

* docs(#2934): refer to nvim in help, not neovim, as this trips the lintdoc spell checker

* docs(#2934): fix broken links

* docs(#2934): add lintdoc.sh, fix some branding spelling

* docs(#2934): update old config links

* docs(#2934): remove 5. Opts, 8.2  Highlight: Overhaul, 15.1  Index: Opts, update links as needed

* docs(#2934): remove indices

* docs(#2934): add bookmarks, put long descriptions into @brief

* docs(#2934): move hidden display to verbatim new section

* docs(#2934): add config lsp examples, link setup

* docs(#2934): normalise heading formatting, remove TOC

* docs(#2934): move all icon and highlight info into a table

* docs(#2934): move all icon and highlight info into a new section

* docs(#2934): normalise all icon and highlight

* docs(#2934): extract nvim_tree.Config field descriptions to class overview

* docs(#2934): consistent string formatting

* docs(#2934): normalise all icon and highlight

* docs(#2934): remove @briefs as they are shown above the class tag

* docs(#2934): don't <pre> filters

* docs(#2934): add experimental example

* docs(#2934): add gen_vimdoc.sh to CI

* docs(#2934): add gen_vimdoc.sh to CI

* docs(#2934): add gen_vimdoc.sh to CI

* docs(#2934): temporarily --ignore-blank-lines during help check

* docs(#2934): add lintdoc.sh to CI

* docs(#2934): add lintdoc.sh to CI

* docs(#2934): add lintdoc.sh to CI

* docs(#2934): move Nvim build and help-check to the end for faster turnaround

* docs(#2934): use make lintdoc target directly

* docs(#2934): CONTRIBUTING.md updates for help generation and lint

* docs(#2934): revert API opts classes changes

* docs(#2934): harden gen and lint scripts, moving things out of nvim-tree source to prevent luals upset

* docs(#2934): harden gen and lint scripts, moving things out of nvim-tree source to prevent luals upset

* docs(#2934): fix lintdoc make target

* docs(#3088): extract api/tree.lua

* docs(#3088): extract api/tree.lua

* docs(#2934): move help diff check after lint

* docs(#3088): update api.tree references, remove old doc

* docs(#3088): extract api/config/mappings.lua

* docs(#3088): api.config.mappings -> api.map

* docs(#3088): extract api/filter.lua

* docs(#3088): move api.git into api.tree

* docs(#3088): extract api/health.lua, tidy formatting

* docs(#3088): extract api/health.lua, tidy formatting

* docs(#3088): remove command descriptions, show lua, link to api

* docs(#3088): extract api/marks.lua

* docs(#3088): remove completed legacy api.lua members

* docs(#3088): extract api/events.lua

* docs(#3088): extract api/events.lua

* docs(#3088): extract api/fs.lua

* docs(#3088): extract api/commands.lua

* docs(#3088): extract api/node.lua functions, doc TODO

* docs(#3088): move all nvim-tree-api to generated doc

* docs(#3088): old api is now impl, use new api

* docs(#3088): extract api/node.lua functions, doc WIP

* docs(#3088): extract api/node.lua functions, doc WIP

* docs(#3088): extract api/node.lua functions, doc WIP

* docs(#3088): extract api/node.lua functions

* docs(#3088): move api into _meta

* docs(#3088): move api-impl out of meta, restore it to its original state with a hyrdrate function

* docs(#3088): remove old Api classes, rename impl Api -> api

* docs(#3088): tidy migrated annotations

* docs(#3088): format nvim_tree.api.commands

* docs(#3088): separate api classes at the end

* docs(#3088): polish vimdoc config

* docs(#3088): format

* docs(#2934): polish vimdoc config

* docs(#2934): snake case config class names

* docs(#2934): snake case config alias names

* docs(#2934): note help tag prefixes

* docs(#2934): snake case config sections

* docs(#2934): move default config to end

* docs(#2934): move setup doc from config to quickstart and setup

* docs(#2934): index contributing

* docs(#3088): cleanup following merge

* docs(#3088): tidy section names

* docs(#3088): split node.navigate and open, move all filters into api.filter

* docs(#3088): hidden->custom toggle default desc

* docs(#3088): add legacy filter api mappings

* docs(#3088): tidy api meta

* docs(#3088): always exclude meta from luacheck, it doesn't offer anything useful

* docs(#3088): extract fs.copy, fix api node param optionality, move legacy api to legacy.lua

* docs(#3088): correct optionality of nvim_tree.config.view.width fields

* docs(#3088): hydrate API before setup with error functions, with some hydrated with their concrete function, wrap removal TODO

* docs(#3088): remove api impl error wrap

* docs(#3088): split api pre and post, add more comments

* docs(#3088): split api pre and post, add more comments

* docs(#3088): extract post impl functions, lazy some requires

* docs(#3088): lazy api impl requires

* Revert "docs(#3088): lazy api impl requires"

This reverts commit c6ea6c5be1.

* docs(#3088): minimise api pre following tests

* docs(#3088): move node classes under api with logical order

* docs(#3088): document node and git classes, namespace internal and external git classes, redact node subclasses

* docs(#3088): fix merge issue

* docs(#3088): tidy pre comments

* docs(#3088): collapse node and fs submodules

* docs(#3088): move api help and classes back into api.lua

* docs(#3088): resize command calls api, not view

* docs(#3088): tidy api map names

* docs(#3088): revert api.git refactor, provide deprecated api meta

* docs(#3088): add deprecated api @see

* docs(#3088): class fixes following merge, disable luacheck on scripts

* docs(#3088): Node:should_expand nops

* docs(#3088): fix _git return

* docs(#3088): add meta for legacy api

* docs(#3088): mark deprecated api modules, use proper namespacing for deprecateds

* docs(#3088): gen_vimdoc now uses full paths, requires a patch for a FIXME

* docs(#3088): add vim_gendoc patches

* Revert "docs(#3088): add vim_gendoc patches"

This reverts commit ebb99093d2.

* Revert "docs(#3088): gen_vimdoc now uses full paths, requires a patch for a FIXME"

This reverts commit ff0184a260.

* docs(#3088): split gen_vimdoc_config into chunks to avoid filename clashes, as gen_vimdoc keys sections by filename

* docs(#3088): move legacy api into api.impl.legacy, fixes following testing

* docs(#3088): remove merge leftover

* docs(#3088): tidy contrib

* docs(#3088): clarify backwards compatibility

* docs(#3088): clarify help generation in contributing

* docs(#3088): contributing index

* docs(#3088): help-update.sh -> help-defaults.sh now using a /tmp file to prevent runaway FS updates

* docs(#3088): help-update.sh -> help-defaults.sh now using a /tmp file to prevent runaway FS updates

* docs(#3088): CI runs make lintdoc to avoid muddying help-check with unnecessary build and possible Nvim lint failures

* docs(#3088): unify help and readme, clarify some wording

* docs(#3088): test a readme toc

* docs(#3088): test a readme toc

* docs(#3088): unify help generation and lint into vimdoc.sh, generation uses nvim source build to execute (#3260)

* docs(#3241): unify help generation and lint into vimdoc.sh, generation uses nvim source build to execute

* docs(#3241): unify help generation and lint into vimdoc.sh, generation uses nvim source build to execute

* docs(#3241): unify help generation and lint into vimdoc.sh, generation uses nvim source build to execute

* docs(#3241): unify help generation and lint into vimdoc.sh, generation uses nvim source build to execute

* docs(#3241): namespace decorator types

* docs(#3241): namespace decorator types

* docs(#3241): namespace decorator types

* docs(#3241): api exposes nvim_tree.api.decorator.Decorator interface, UserDecorator deprecated

* docs(#3241): move decorator meta into place

* docs(#3241): generate decorator help

* docs(#3241): separate api and class generation configs, namespace classes without their filename, nicer generation placeholder

* docs(#3241): fix potential bug in builder: passing a nil node to a user decorator

* docs(#3241): nvim-tree-api-decorator brief

* docs(#3241): Decorator class documentation

* docs(#3241): add placholder to vimdoc.sh

* docs(#3241): extract nvim_tree.config.renderer.decorator, add decorators to hl help section

* docs(#3241): use general nvim_tree.api.highlighted_string

* docs(#3241): add nvim-tree-class-decorator-example

* docs(#3241): move renderer alias doc to the class

* docs(#3241): Class -> nvim_tree.Class

* docs(#3241): Class -> nvim_tree.Class

* docs(#3241): document nvim_tree.Class

* docs(#3241): fix help lua indentation

* docs(#3241): extract builtin decorator interface, partially complete

* docs(#3241): extracted BuiltinDecorator

* docs(#3241): add BuiltinDecorator constructor

* docs(#3241): revert api function changes

* docs(#3241): revert api function changes

* docs(#3241): vimdoc polish

* docs(#3241): tidy

* docs(#3241): tidy
2026-02-13 12:58:03 +11:00
Alexander Courtis
c0b18e4879 docs(#3088): add nvim-tree.api* function and class meta, generate help API, lazy load API before setup, rename some API in a non-breaking manner (#3244)
* doc(#2934): POC to use gen_vimdoc.lua for decorator meta

* doc(#2934): use injected gen_vimdoc.lua from nvim source, move decorators to main help

* doc(#2934): tidy and harden scripts

* doc(#2934): add nvim_tree.Config meta classes, add nvim_tree.api. meta classes

* doc(#2934): add nvim_tree.Config to help

* doc(#2934): add nvim_tree.api classes to help

* doc(#2934): tidy and correct nvim_tree.Config.UI and nvim_tree.Config.Actions

* doc(#2934): tidy and correct nvim_tree.Config.HijackDirectories, format and order nvim_tree.Config

* doc(#2934): tidy and nvim_tree.Config top level

* doc(#2934): tidy and format nvim_tree.Config.LiveFilter, Modified, Tab, Trash

* doc(#2934): tidy and format nvim_tree.Config.FilesystemWatchers, Log

* doc(#2934): split nvim_tree.Config into files, Sort and HijackDirectories populate others placeholder

* doc(#2934): more generic gen_vimdoc_config module config

* doc(#2934): tidy Config.HijackDirectories and Actions, move them into place

* doc(#2934): tidy Config.Modified, move into place

* doc(#2934): tidy Config.LiveFilter, move into place

* doc(#2934): tidy Config.FilesystemWatchers, move into place

* doc(#2934): tidy Config.Trash, move into place

* doc(#2934): tidy Config.Tab, move into place

* doc(#2934): tidy Config.UI, move into place

* doc(#2934): tidy Config.Log, move into place

* doc(#2934): tidy Config.Notify, move into place

* doc(#2934): tidy Config.SystemOpen, move into place

* doc(#2934): tidy Config.Help, move into place

* doc(#2934): tidy Config.Help, move into place

* doc(#2934): tidy Config.Help, move into place

* doc(#2934): tidy Config.Diagnostics, move into place

* doc(#2934): remove api/decorator as they are out of scope, revert api_decorator.lua changes, retain api opts classes but make them exact

* doc(#2934): tidy Config.Filters, move into place

* doc(#2934): tidy Config.FilesystemWatchers, move into place

* doc(#2934): tidy Config.FilesystemWatchers, Git, move into place

* doc(#2934): tidy Config.UpdateFocusedFile, move into place

* doc(#2934): tidy Config.Sort, move into place

* doc(#2934): tidy Config.View, move into place

* doc(#2934): tidy Config.View, move into place

* docs(#2934): type DEFAULT_OPTS, use bracketed references to keep luals happy

* docs(#2934): tidy, inline some classes

* docs(#2934): tidy Config.Renderer

* docs(#2934): remove problematic glyphs, tidy other glyphs

* docs(#2934): tidy Config.Renderer, ensure functions are parenthesised when necessary

* docs(#2934): tidy Config.Renderer

* docs(#2934): tidy Config.Renderer, move into place

* docs(#2934): tidy Config.Renderer

* docs(#2934): tidy Config.FilesystemWatchers

* docs(#2934): fix broken links

* docs(#2934): fix broken links

* docs(#2934): fix broken links

* docs(#2934): fix broken links

* docs(#2934): refer to nvim in help, not neovim, as this trips the lintdoc spell checker

* docs(#2934): fix broken links

* docs(#2934): add lintdoc.sh, fix some branding spelling

* docs(#2934): update old config links

* docs(#2934): remove 5. Opts, 8.2  Highlight: Overhaul, 15.1  Index: Opts, update links as needed

* docs(#2934): remove indices

* docs(#2934): add bookmarks, put long descriptions into @brief

* docs(#2934): move hidden display to verbatim new section

* docs(#2934): add config lsp examples, link setup

* docs(#2934): normalise heading formatting, remove TOC

* docs(#2934): move all icon and highlight info into a table

* docs(#2934): move all icon and highlight info into a new section

* docs(#2934): normalise all icon and highlight

* docs(#2934): extract nvim_tree.Config field descriptions to class overview

* docs(#2934): consistent string formatting

* docs(#2934): normalise all icon and highlight

* docs(#2934): remove @briefs as they are shown above the class tag

* docs(#2934): don't <pre> filters

* docs(#2934): add experimental example

* docs(#2934): add gen_vimdoc.sh to CI

* docs(#2934): add gen_vimdoc.sh to CI

* docs(#2934): add gen_vimdoc.sh to CI

* docs(#2934): temporarily --ignore-blank-lines during help check

* docs(#2934): add lintdoc.sh to CI

* docs(#2934): add lintdoc.sh to CI

* docs(#2934): add lintdoc.sh to CI

* docs(#2934): move Nvim build and help-check to the end for faster turnaround

* docs(#2934): use make lintdoc target directly

* docs(#2934): CONTRIBUTING.md updates for help generation and lint

* docs(#2934): revert API opts classes changes

* docs(#2934): harden gen and lint scripts, moving things out of nvim-tree source to prevent luals upset

* docs(#2934): harden gen and lint scripts, moving things out of nvim-tree source to prevent luals upset

* docs(#2934): fix lintdoc make target

* docs(#3088): extract api/tree.lua

* docs(#3088): extract api/tree.lua

* docs(#2934): move help diff check after lint

* docs(#3088): update api.tree references, remove old doc

* docs(#3088): extract api/config/mappings.lua

* docs(#3088): api.config.mappings -> api.map

* docs(#3088): extract api/filter.lua

* docs(#3088): move api.git into api.tree

* docs(#3088): extract api/health.lua, tidy formatting

* docs(#3088): extract api/health.lua, tidy formatting

* docs(#3088): remove command descriptions, show lua, link to api

* docs(#3088): extract api/marks.lua

* docs(#3088): remove completed legacy api.lua members

* docs(#3088): extract api/events.lua

* docs(#3088): extract api/events.lua

* docs(#3088): extract api/fs.lua

* docs(#3088): extract api/commands.lua

* docs(#3088): extract api/node.lua functions, doc TODO

* docs(#3088): move all nvim-tree-api to generated doc

* docs(#3088): old api is now impl, use new api

* docs(#3088): extract api/node.lua functions, doc WIP

* docs(#3088): extract api/node.lua functions, doc WIP

* docs(#3088): extract api/node.lua functions, doc WIP

* docs(#3088): extract api/node.lua functions

* docs(#3088): move api into _meta

* docs(#3088): move api-impl out of meta, restore it to its original state with a hyrdrate function

* docs(#3088): remove old Api classes, rename impl Api -> api

* docs(#3088): tidy migrated annotations

* docs(#3088): format nvim_tree.api.commands

* docs(#3088): separate api classes at the end

* docs(#3088): polish vimdoc config

* docs(#3088): format

* docs(#2934): polish vimdoc config

* docs(#2934): snake case config class names

* docs(#2934): snake case config alias names

* docs(#2934): note help tag prefixes

* docs(#2934): snake case config sections

* docs(#2934): move default config to end

* docs(#2934): move setup doc from config to quickstart and setup

* docs(#2934): index contributing

* docs(#3088): cleanup following merge

* docs(#3088): tidy section names

* docs(#3088): split node.navigate and open, move all filters into api.filter

* docs(#3088): hidden->custom toggle default desc

* docs(#3088): add legacy filter api mappings

* docs(#3088): tidy api meta

* docs(#3088): always exclude meta from luacheck, it doesn't offer anything useful

* docs(#3088): extract fs.copy, fix api node param optionality, move legacy api to legacy.lua

* docs(#3088): correct optionality of nvim_tree.config.view.width fields

* docs(#3088): hydrate API before setup with error functions, with some hydrated with their concrete function, wrap removal TODO

* docs(#3088): remove api impl error wrap

* docs(#3088): split api pre and post, add more comments

* docs(#3088): split api pre and post, add more comments

* docs(#3088): extract post impl functions, lazy some requires

* docs(#3088): lazy api impl requires

* Revert "docs(#3088): lazy api impl requires"

This reverts commit c6ea6c5be1.

* docs(#3088): minimise api pre following tests

* docs(#3088): move node classes under api with logical order

* docs(#3088): document node and git classes, namespace internal and external git classes, redact node subclasses

* docs(#3088): fix merge issue

* docs(#3088): tidy pre comments

* docs(#3088): collapse node and fs submodules

* docs(#3088): move api help and classes back into api.lua

* docs(#3088): resize command calls api, not view

* docs(#3088): tidy api map names

* docs(#3088): revert api.git refactor, provide deprecated api meta

* docs(#3088): add deprecated api @see

* docs(#3088): class fixes following merge, disable luacheck on scripts

* docs(#3088): Node:should_expand nops

* docs(#3088): fix _git return

* docs(#3088): add meta for legacy api

* docs(#3088): mark deprecated api modules, use proper namespacing for deprecateds

* docs(#3088): gen_vimdoc now uses full paths, requires a patch for a FIXME

* docs(#3088): add vim_gendoc patches

* Revert "docs(#3088): add vim_gendoc patches"

This reverts commit ebb99093d2.

* Revert "docs(#3088): gen_vimdoc now uses full paths, requires a patch for a FIXME"

This reverts commit ff0184a260.

* docs(#3088): split gen_vimdoc_config into chunks to avoid filename clashes, as gen_vimdoc keys sections by filename

* docs(#3088): move legacy api into api.impl.legacy, fixes following testing

* docs(#3088): remove merge leftover

* docs(#3088): tidy contrib

* docs(#3088): clarify backwards compatibility

* docs(#3088): clarify help generation in contributing

* docs(#3088): contributing index

* docs(#3088): help-update.sh -> help-defaults.sh now using a /tmp file to prevent runaway FS updates

* docs(#3088): help-update.sh -> help-defaults.sh now using a /tmp file to prevent runaway FS updates

* docs(#3088): CI runs make lintdoc to avoid muddying help-check with unnecessary build and possible Nvim lint failures

* docs(#3088): unify help and readme, clarify some wording

* docs(#3088): test a readme toc

* docs(#3088): test a readme toc

* docs(#3088): unify help generation and lint into vimdoc.sh, generation uses nvim source build to execute (#3260)

* docs(#3241): unify help generation and lint into vimdoc.sh, generation uses nvim source build to execute

* docs(#3241): unify help generation and lint into vimdoc.sh, generation uses nvim source build to execute

* docs(#3241): unify help generation and lint into vimdoc.sh, generation uses nvim source build to execute

* docs(#3241): unify help generation and lint into vimdoc.sh, generation uses nvim source build to execute
2026-02-12 11:10:36 +11:00
Alexander Courtis
037d89e60f docs(#3243): renderer.hidden_display help documentation is generated (#3258) 2026-01-31 15:31:37 +11:00
Alexander Courtis
c07ce43527 fix(#3198): add filesystem_watchers.max_events to handle runaway filesystem events on PowerShell (#3232)
* fix(#3198): add filesystem_watchers.max_outstanding_events which disables filesystem watchers on a directory when runaway events are received

* fix(#3198): document filesystem_watchers.max_events

* fix(#3198): document filesystem_watchers.max_events
2026-01-27 12:28:05 +11:00
Alexander Courtis
869fc957ed docs(#2934): add nvim_tree.config* classes with generated help and new nvim-tree-icons-highlighting help section (#3235)
* doc(#2934): POC to use gen_vimdoc.lua for decorator meta

* doc(#2934): use injected gen_vimdoc.lua from nvim source, move decorators to main help

* doc(#2934): tidy and harden scripts

* doc(#2934): add nvim_tree.Config meta classes, add nvim_tree.api. meta classes

* doc(#2934): add nvim_tree.Config to help

* doc(#2934): add nvim_tree.api classes to help

* doc(#2934): tidy and correct nvim_tree.Config.UI and nvim_tree.Config.Actions

* doc(#2934): tidy and correct nvim_tree.Config.HijackDirectories, format and order nvim_tree.Config

* doc(#2934): tidy and nvim_tree.Config top level

* doc(#2934): tidy and format nvim_tree.Config.LiveFilter, Modified, Tab, Trash

* doc(#2934): tidy and format nvim_tree.Config.FilesystemWatchers, Log

* doc(#2934): split nvim_tree.Config into files, Sort and HijackDirectories populate others placeholder

* doc(#2934): more generic gen_vimdoc_config module config

* doc(#2934): tidy Config.HijackDirectories and Actions, move them into place

* doc(#2934): tidy Config.Modified, move into place

* doc(#2934): tidy Config.LiveFilter, move into place

* doc(#2934): tidy Config.FilesystemWatchers, move into place

* doc(#2934): tidy Config.Trash, move into place

* doc(#2934): tidy Config.Tab, move into place

* doc(#2934): tidy Config.UI, move into place

* doc(#2934): tidy Config.Log, move into place

* doc(#2934): tidy Config.Notify, move into place

* doc(#2934): tidy Config.SystemOpen, move into place

* doc(#2934): tidy Config.Help, move into place

* doc(#2934): tidy Config.Help, move into place

* doc(#2934): tidy Config.Help, move into place

* doc(#2934): tidy Config.Diagnostics, move into place

* doc(#2934): remove api/decorator as they are out of scope, revert api_decorator.lua changes, retain api opts classes but make them exact

* doc(#2934): tidy Config.Filters, move into place

* doc(#2934): tidy Config.FilesystemWatchers, move into place

* doc(#2934): tidy Config.FilesystemWatchers, Git, move into place

* doc(#2934): tidy Config.UpdateFocusedFile, move into place

* doc(#2934): tidy Config.Sort, move into place

* doc(#2934): tidy Config.View, move into place

* doc(#2934): tidy Config.View, move into place

* docs(#2934): type DEFAULT_OPTS, use bracketed references to keep luals happy

* docs(#2934): tidy, inline some classes

* docs(#2934): tidy Config.Renderer

* docs(#2934): remove problematic glyphs, tidy other glyphs

* docs(#2934): tidy Config.Renderer, ensure functions are parenthesised when necessary

* docs(#2934): tidy Config.Renderer

* docs(#2934): tidy Config.Renderer, move into place

* docs(#2934): tidy Config.Renderer

* docs(#2934): tidy Config.FilesystemWatchers

* docs(#2934): fix broken links

* docs(#2934): fix broken links

* docs(#2934): fix broken links

* docs(#2934): fix broken links

* docs(#2934): refer to nvim in help, not neovim, as this trips the lintdoc spell checker

* docs(#2934): fix broken links

* docs(#2934): add lintdoc.sh, fix some branding spelling

* docs(#2934): update old config links

* docs(#2934): remove 5. Opts, 8.2  Highlight: Overhaul, 15.1  Index: Opts, update links as needed

* docs(#2934): remove indices

* docs(#2934): add bookmarks, put long descriptions into @brief

* docs(#2934): move hidden display to verbatim new section

* docs(#2934): add config lsp examples, link setup

* docs(#2934): normalise heading formatting, remove TOC

* docs(#2934): move all icon and highlight info into a table

* docs(#2934): move all icon and highlight info into a new section

* docs(#2934): normalise all icon and highlight

* docs(#2934): extract nvim_tree.Config field descriptions to class overview

* docs(#2934): consistent string formatting

* docs(#2934): normalise all icon and highlight

* docs(#2934): remove @briefs as they are shown above the class tag

* docs(#2934): don't <pre> filters

* docs(#2934): add experimental example

* docs(#2934): add gen_vimdoc.sh to CI

* docs(#2934): add gen_vimdoc.sh to CI

* docs(#2934): add gen_vimdoc.sh to CI

* docs(#2934): temporarily --ignore-blank-lines during help check

* docs(#2934): add lintdoc.sh to CI

* docs(#2934): add lintdoc.sh to CI

* docs(#2934): add lintdoc.sh to CI

* docs(#2934): move Nvim build and help-check to the end for faster turnaround

* docs(#2934): use make lintdoc target directly

* docs(#2934): CONTRIBUTING.md updates for help generation and lint

* docs(#2934): revert API opts classes changes

* docs(#2934): harden gen and lint scripts, moving things out of nvim-tree source to prevent luals upset

* docs(#2934): harden gen and lint scripts, moving things out of nvim-tree source to prevent luals upset

* docs(#2934): fix lintdoc make target

* docs(#2934): polish vimdoc config

* docs(#2934): snake case config class names

* docs(#2934): snake case config alias names

* docs(#2934): note help tag prefixes

* docs(#2934): snake case config sections

* docs(#2934): move default config to end

* docs(#2934): move setup doc from config to quickstart and setup

* docs(#2934): index contributing

* docs(#2934): tidy gitignore

* docs(#2934): tidy formatting

* docs(#2934): lint and check scripts, rewrite luals check script following upstream changes

* docs(#2934): script tidying

* docs(#2934): add a temporary codestyle violation to test scripts

* Revert "docs(#2934): add a temporary codestyle violation to test scripts"

This reverts commit fca4dbf70a.

* docs(#2934): remove class from config section headers
2026-01-22 12:23:55 +11:00
Ivan Krasilnikov
ca8d82fff2 feat: add default <Del> mapping for api.fs.remove (#3238)
feat: add <Del> mapping

Co-authored-by: Alexander Courtis <alex@courtis.org>
2026-01-14 17:44:38 +11:00
xiantang
c89215d6a1 feat(#1851): add bookmarks.persist, default path: vim.fn.stdpath("data") .. "/nvim-tree-bookmarks.json", disabled by default (#3033)
* Support Persist Bookmarks

* Fix node new open error

* Fix filter marks index issue

* Made saving/loading conditional on enable_persistence,

* add method comments

* Use a pcall to prevent an error being raised

* Print errmsg and disable persistence on a bad path

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

* fix: use public list() method instead of accessing private marks field

* refactor: rename marks config to bookmarks and simplify persistence API

- Rename opts.marks to opts.bookmarks for better clarity
- Simplify persist option to boolean | string (true uses default path)
- Implement lazy node resolution for loaded bookmarks
- Update documentation with new bookmarks configuration
- Improve bulk operations to use public list() method consistently

* refactor: rename marks config to bookmarks and simplify persistence API

- Rename opts.marks to opts.bookmarks for better clarity
- Simplify persist option to boolean | string (true uses default path)
- Implement lazy node resolution for loaded bookmarks
- Update documentation with new bookmarks configuration
- Improve bulk operations to use public list() method consistently

* add errmsg in return

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

* fix: correct indentation in filters.lua to match codestyle

* fix: add missing else block to handle bookmark save errors and use errmsg variable

* refactor: use string.format for bookmark warnings and update documentation

- Replace string concatenation with string.format in bookmark error messages
- Remove outdated comment about bookmark persistence from documentation

---------

Co-authored-by: Alexander Courtis <alex@courtis.org>
2026-01-11 15:06:36 +11:00
Šimon Mandlík
776a5cdfac feat(#3213): add view.width.lines_excluded option (#3214)
feat(#3213): add `view.width.lines_excluded` option
2025-12-01 08:29:34 +11:00
Šimon Mandlík
81ede55c47 fix: renderer.add_trailing applies to symlink destination (#3217)
feat: use `add_trailing` also for symlink destination
2025-11-21 16:20:45 +11:00
Eric Wong
64e2192f52 feat: set filter input filetype to NvimTreeFilter (#3207)
feat: add NvimTreeFilter filetype
2025-10-20 00:50:08 +00:00
Igor Lacerda
fefa335f1c feat(#1826): add diagnostics.diagnostic_opts: vim.diagnostic.Opts will override diagnostics.severity and diagnostics.icons (#3190)
* feat(#1826): allow using config from vim.diagnostic for icons + severity

* update help default options, add index

---------

Co-authored-by: Alexander Courtis <alex@courtis.org>
2025-08-25 13:22:05 +10:00
Kasper Kondzielski
1b876db049 feat(#2789): add optional function expand_until to api.tree.expand_all and api.node.expand (#3166)
* feat: Allow to expand nodes until certain condition is met

* Fix warnings

* Restore original position of edit function

* Rename field to match the api method name

* Rename ApiTreeExpandAllOpts to ApiTreeExpandOpts

* Remove toggle_descend_until

* Remove redundant empty line

* Update :help for changed methods

* Fix partial expansion of grouped nodes

* Fix lint error

* Fix linting error

* Fix incorrect open/close indicator state

* Update docs

* Rename descend_until option to expand_until

* Always check directory expansion limit

* Fix linter errors

* Ignore unused param warning

* Apply suggestions from code review

* simplify MAX_FOLDER_DISCOVERY warning

* fix bad comment whitespace

---------

Co-authored-by: ghostbuster91 <ghostbuster91@users.noreply.github.com>
Co-authored-by: Alexander Courtis <alex@courtis.org>
2025-08-11 13:50:26 +10:00
Alexander Courtis
a4699c0904 revert(#3180, #3177): resolve live filter failures (#3183)
* Revert "fix(#3172): live filter exception (#3173)"

This reverts commit 0a7fcdf3f8.

* Revert "refactor(#2826): move view to instanced window class (#3153)"

This reverts commit 0a06f65bf0.

* feat(#3157): add view.cursorlineopt
2025-08-10 14:45:25 +10:00
Alexander Courtis
9b289abd69 revert(#3180, #3177): invalid group or tabpage (#3181)
* Revert "feat(#2826): allow only one window with nvim-tree buffer per tab (#3174)"

This reverts commit dd2364d680.

* Revert "refactor(#2826): View tracks winids and bufnrs via events, unused for now (#3170)"

This reverts commit 65bae44922.

* Revert "refactor(#2826): remove view debug/cc, enable new codepaths for get_winid and get_bufnr (#3169)"

This reverts commit a9156c0139.
2025-08-10 11:18:31 +10:00
Alexander Courtis
a9156c0139 refactor(#2826): remove view debug/cc, enable new codepaths for get_winid and get_bufnr (#3169)
* refactor(#2826): fuller error messages

* refactor(#2826): winnr->winid in view/globals, remove redundant get_winid and get_bufnr calls

* refactor(#2826): winnr->winid consistently

* refactor(#2826): consistent use of buffer registry, tidy, add todos

* refactor(#2826): remove unnecessary view members float, hide_root_folder; use explorer opts

* refactor(#2826): remove unused view members centralize_selection and preserve_window_proportions

* refactor(#2826): remove unused view member height

* refactor(#2826): temporarily reuse BUFNR_PER_TAB in view constructor

* refactor(#2826): get_winid returns new after consistency check

* refactor(#2826): globals.TABPAGES -> WINID_PER_TAB

* refactor(#2826): consistent naming of tabid

* refactor(#2826): more consistency checking

* refactor(#2826): more consistency checking

* refactor(#2826): move global CURSORS to view member

* Revert "refactor(#2826): move global CURSORS to view member"

This reverts commit d84dfad1c3.

* refactor(#2826): move global CURSORS to view member

* refactor(#2826): consistency check returns new

* refactor(#2826): remove consistency checks, enabling new path for view get_winid and get_bufnr

* refactor(#2826): restore CURSORS global
2025-07-28 12:44:17 +10:00
Alexander Courtis
b0b49552c9 docs: polish example decorator (#3160) 2025-06-21 10:57:48 +10:00
Alexander Courtis
8eb5e0bfd1 feat(#3157): add view.cursorlineopt (#3158)
fix(#3157): add view.cursorlineopt
2025-06-20 13:46:38 +10:00
Alexander Courtis
0a06f65bf0 refactor(#2826): move view to instanced window class (#3153)
* refactor(#2826): singleton View class, WIP

* refactor(#2826): singleton View class, WIP

* refactor(#2826): singleton View class, WIP

* refactor(#2826): singleton View class, WIP

* refactor(#2826): singleton View class, WIP

* refactor(#2826): singleton View class, WIP

* refactor(#2826): singleton View class, WIP

* refactor(#2826): singleton View class

* refactor(#2826): View is an Explorer member

* refactor(#2826): move autocmds to Explorer

* refactor(#2826): API uses Explorer's View

* refactor(#2826): move View into Explorer package

* refactor(#2826): retain necessary view globals

* refactor(#2826): move all winhl to appearance constants

* refactor(#2826): add lifecycle logging to all Explorer members

* refactor(#2826): fix bad cherry-pick

* refactor(#2826): better enumerate_options function

* refactor(#2826): add View.tab_line for debugging

* refactor(#2826): default lifecycle log off

* refactor(#2826): add experimental.multi_instance_debug, split globals out of view, move diagnostics to its own module

* refactor(#2826): instrument View:get_winnr

* refactor(#2826): instrument View:setup_tabpage

* refactor(#2826): instrument View:set_current_win, View:prevent_buffer_override

* refactor(#2826): instrument View:get_bufnr

* refactor(#2826): track member bufnr -> winid with global

* refactor(#2826): tidy experiment names and logs

* vim: nvim-tree: track bufnr via buffer-update channel

* vim: nvim-tree: more logging

* vim: nvim-tree: revert: track bufnr via buffer-update channel

* refactor(#2826): notify error on view winid and bufnr mismatches

* refactor(#2826): notify error on view winid and bufnr mismatches

* refactor(#2826): explorer init logging
2025-06-19 15:45:55 +10:00
Garry Filakhtov
aa087788d7 docs: fix renderer.icons.bookmarks_placement parameter, misspelling (#3150)
Fix minor documentation issues

Add a missing double quotes around the default value for
`nvim-tree.renderer.icons.bookmarks_placement` config value and fix
spelling of `bookmarked`.
2025-06-17 10:23:34 +10:00
Rami Elwan
ae595611fb feat(#3132): add api.node.expand and api.node.collapse (#3133)
* feat: allow passing node to collapse all

* refactor: use snake case

* feat: handle api legacy calls and update signature

* refactor: make sure open is a boolean

* doc: collapse_all

* Revert "doc: collapse_all"

This reverts commit d243da3e14.

* add api.node.collapse

* add api.node.expand

* add api.node.expand

---------

Co-authored-by: Alexander Courtis <alex@courtis.org>
2025-06-14 17:26:58 +10:00
Lucas Mendes
05d8172ebf fix(#3143): actions.open_file.window_picker.exclude applies when not using window picker (#3144)
* fix(#3143): ensure open.no_window_picker respects window_picker.exclude

* fix(#3143): doc

---------

Co-authored-by: Alexander Courtis <alex@courtis.org>
2025-06-14 15:35:07 +10:00
Spencer Chunn
ea5097a1e2 feat(#3113): add renderer.icons.folder_arrow_padding (#3114)
* Update padding.lua

* add folder_arrow_padding

* update help docs

* refactor: renderer.icons.padding

renderer.icons.padding -> renderer.icons.padding.icon
renderer.icons.folder_arrow_padding ->
renderer.icons.padding.folder_arrow

* refactor: renderer.icons.padding

---------

Co-authored-by: Alexander Courtis <alex@courtis.org>
2025-05-05 11:51:29 +10:00
Devansh Sharma
c24c0470d9 feat: add TreePreOpen event (#3105)
* feat: Add `TreePreOpen` and `TreePreClose` events

* docs: Update docs for `TreePreOpen` and `TreePreClose` events

* chore: remove `TreePreClose` event and update dispatch of `TreePreOpen`

---------

Co-authored-by: Alexander Courtis <alex@courtis.org>
2025-04-21 08:39:48 +10:00
Gabriel Crispino
3281f331f7 feat(#1984): add quit_on_open and focus opts to various api.node.open functions (#3054)
* feat: add quit_on_open opt to api.node.open.edit

* fix: fix missing @param annotation

* feat: add focus opt to api.node.open.edit

* fix: fix focus == false behaviour on api.node.open.tab command

* fix: add optional tabpage integer parameter to view.close

if tabpage is not nil, then the function closes the tabpage in this
specific tabpage

* fix: fix quit_on_open == true behaviour on api.node.open.tab command

* fix: add check to not use new opts for certain edit modes

* fix: add docs for new opts

---------

Co-authored-by: Alexander Courtis <alex@courtis.org>
2025-02-22 11:09:49 +11:00
Gabriel Crispino
fee1da8897 feat(#3037): add API node.buffer.delete, node.buffer.wipe (#3040)
* feat(mappings): add key map to close file buffer

* feat: implement Api.node.buffer.delete

* feat: implement Api.node.buffer.wipe

* refactor: add util fn for common delete ops on bufs

* fix: minor fixes

* refactor: fix lint issues

* fix: undo unintended ApiTreeToggleOpts change

* fix: change error message level to info

* fix: remove unused opts

* refactor: merge delete-buffer and wipe-buffer into single buffer file

* refactor: make wipe and delete fns take a node instead of a file path

* docs: update help with new API commands

* remove refactored utils.lua

* remove unused static setup

* tweak doc

---------

Co-authored-by: Alexander Courtis <alex@courtis.org>
2025-01-25 12:47:34 +11:00
fdgdgerg
68fc4c20f5 feat(api): add node.open.vertical_no_picker, node.open.horizontal_no_picker (#3031)
* test

* add splits with no window pickers

removed the 1 buffer per file limitation

test

test2

* no-picker for splits

* help vertical/horizontal_no_picker

* revert whitespace changes

---------

Co-authored-by: JoeDaBu <joegbu@gmail.com>
Co-authored-by: Alexander Courtis <alex@courtis.org>
2024-12-22 09:35:48 +11:00
Jie Liu
6b4be1dc0c fix: view.width functions may return strings (#3020)
* Fix get_size() function when size is a function return string

* update view.width help

---------

Co-authored-by: Alexander Courtis <alex@courtis.org>
2024-12-08 11:45:32 +11:00
Alexander Courtis
7a4ff1a516 feat(#2948): add custom decorators, :help nvim-tree-decorators (#2996)
* feat(#2948): add UserDecorator, proof of concept

* feat(#2948): add UserDecorator, proof of concept

* feat(#2948): add UserDecorator, proof of concept

* feat(#2948): add UserDecorator

* feat(#2948): add UserDecorator

* feat(#2948): add UserDecorator

* feat(#2948): add Decorator node icon override

* feat(#2948): add nvim_tree.api.* node classes

* feat(#2948): extract _meta following nvim pattern

* feat(#2948): extract _meta following nvim pattern

* feat(#2948): add decorator registry and order

* feat(#2948): add decorator registry and order

* feat(#2948): tidy

* feat(#2948): document API

* feat(#2948): document API

* feat(#2948): document API

* feat(#2948): pass api nodes to user decorators

* feat(#2948): document API

* feat(#2948): use renderer.decorators to define order and register

* feat(#2948): tidy decorator args and complete documentation

* feat(#2948): decorator classes specified by prefix rather than suffix

* feat(#2948): improve doc

* feat(#2948): improve doc

* feat(#2948): improve doc

* feat(#2948): additional user decorator safety

* feat(#2948): create nvim_tree.api.decorator.UserDecorator class in API, add :extend

* feat(#2948): improve doc
2024-12-07 16:03:29 +11:00
Alexander Courtis
1f3ffd6af1 fix(#2954): more efficient LSP updates, increase diagnostics.debounce_delay from 50ms to 500ms (#3007)
* fix(#2954): use LSP diagnostic data deltas from events instead of a full query

* fix(#2954): use LSP diagnostic data deltas from events instead of a full query
2024-11-22 10:12:47 +11:00
Alexander Courtis
2ee1c5e17f feat(#2819): add actions.open_file.relative_path, default enabled, following successful experiment (#2995) 2024-11-09 14:44:59 +11:00
Alexander Courtis
e4bc05b415 doc: remove outdated warning from actions.change_dir.global 2024-10-27 10:48:17 +11:00