* 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
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`.
* 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>
* 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>
* 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>
* 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>
* Fix get_size() function when size is a function return string
* update view.width help
---------
Co-authored-by: Alexander Courtis <alex@courtis.org>
* 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
* feat(#2938): filesystem_watchers.ignore_dirs defaults to { node_modules } to resolve pathalogical issues
* feat(#2938): more filesystem_watchers.ignore_dirs defaults to to resolve pathalogical issues
* feat(#2938): more filesystem_watchers.ignore_dirs defaults to to resolve pathalogical issues
* feat(icon_placement): Allow right_align icon_placemente for decorator using ext_marks nvim api
* feat(icon_placement): Allow right_align icon_placemente for decorator using ext_marks nvim api
feat(icon_placement): Allow right_align icon_placemente for decorator using ext_marks nvim api
* feat(icon_placement): consolidate doc
* fix: extra namespace added to avoid colision between right_align and full_name features
* feat(hidden_display): Allow fine grained rendering of hidden files in
a folder
* feat(hidden_display): update defaults in Builder to allow rendering
* feat(hidden_display): Rename opts function name for the feature
* feat(#2349): add "right_align" option for renderer.icons.*_placement (#2846)
* feat(icon_placement): Allow right_align icon_placemente for decorator using ext_marks nvim api
* feat(icon_placement): Allow right_align icon_placemente for decorator using ext_marks nvim api
feat(icon_placement): Allow right_align icon_placemente for decorator using ext_marks nvim api
* feat(icon_placement): consolidate doc
* fix: extra namespace added to avoid colision between right_align and full_name features
* style: rename namespace_id
---------
Co-authored-by: Alexander Courtis <alex@courtis.org>
* docs: update docs
* feat(hidden_display): Simplification and better performance by not sorting and grouping virtual lines
* Update doc/nvim-tree-lua.txt
Co-authored-by: Alexander Courtis <alex@courtis.org>
* style: hidden_stats is better
* docs: change to hidden_stats
* add separate namespace for virtual lines
* help: add highlight group
---------
Co-authored-by: Alexander Courtis <alex@courtis.org>
* feat(icon_placement): Allow right_align icon_placemente for decorator using ext_marks nvim api
* feat(icon_placement): Allow right_align icon_placemente for decorator using ext_marks nvim api
feat(icon_placement): Allow right_align icon_placemente for decorator using ext_marks nvim api
* feat(icon_placement): consolidate doc
* fix: extra namespace added to avoid colision between right_align and full_name features
* style: rename namespace_id
---------
Co-authored-by: Alexander Courtis <alex@courtis.org>
* feat(hidden_decorator): Allow hidden (dotfiles) to be highlighted, both icon and name (this not related to git highlights).
Better defaults
squashed
docs(hidden)
docs(hidden)
docs(hidden)
* fix(typo): small typo on hl groups
* feat(hidden_dotfile_highlight): make a file that has a dotfile parent be also a dotfile
* docs: update docs on hidden highlight
---------
Co-authored-by: Alexander Courtis <alex@courtis.org>
* feat(icon_placement): Allow right_align icon_placemente for decorator using ext_marks nvim api
* feat(icon_placement): Allow right_align icon_placemente for decorator using ext_marks nvim api
feat(icon_placement): Allow right_align icon_placemente for decorator using ext_marks nvim api
* feat(icon_placement): consolidate doc
---------
Co-authored-by: Alexander Courtis <alex@courtis.org>
* Add update_focused_file.exclude and move update_focused_file.ignore_list to update_focused_file.update_root.ignore_list
* Pass ci checks
* Add config migration for update_root and ignore_list
* Missed one mention of update root in find_file.lua
* Update migration code
Co-authored-by: Alexander Courtis <alex@courtis.org>
* make docs consistent
* match on filename instead of entire path
* exclude as a function
* fix docs
* default exclude value
---------
Co-authored-by: Alexander Courtis <alex@courtis.org>
* feat(#2654): add `binaries` field to `filters`
* feat(#2648): allow functions in `filters.custom`
* ci: fix: stylua check
* ci: fix: add new keybind and config to docs
* fix: replace os-specific binary filter with `vim.fn.executable`
* fix: remove function and mapping for `binaries` filter
* fix: add `node` parameter to custom filter function
* fix: update doc for custom filter function signature
* fix: add custom filter to `ACCEPTED_TYPES`
* fix: accept single function for custom filter
* fix: change custom filter on `ACCEPTED_TYPES`
* fix: revert to using `path` for custom filter function
* fix: use `function` type for custom filter
* fix: type for custom filter in help
* fix: custom filter single function no longer mutates `M.config.filter_custom`
* fix: remove dead `if` statement in custom filter
* fix: separate custom filter function from `M.ignore_list`
* doc nit
---------
Co-authored-by: darcy <44690813+darccyy@users.noreply.github.com>
Co-authored-by: Alexander Courtis <alex@courtis.org>
* feat: ungrouping empty directories
* add a new api to toggle empty folders
* solve comments
* solve comments
* update help
---------
Co-authored-by: juefei yan <juefeiyan@juefeis-MacBook-Air.local>
Co-authored-by: Alexander Courtis <alex@courtis.org>
* fix: Add support for get_hl_defs in nvim 0.8
nvim-tree is using `nvim_get_hl` which was introduced in nvim 0.9 to
replace the unstable `get_hl_defs` in the following [commit](https://github.com/neovim/neovim/pull/22693/files).
Unfortunately this raises an error in 0.8 nvim versions due to the
function not existing.
```
Failed to run `config` for nvim-tree.lua
...are/nvim/lazy/nvim-tree.lua/lua/nvim-tree/appearance.lua:199: attempt to call field 'nvim_get_hl' (a nil value)
stacktrace:
- ~/.config/nvim/lua/confidenceman02/plugins/nvim-tree.lua:14 _in_ **config**
- ~/.config/nvim/lua/confidenceman02/lazy.lua:14
```
- Fall back to get_hl_defs when detecting 0.8
- Set the 'link' property to nil to emulate `link = false` in
`builder.lua`
* fix(#2415): nvim 0.8 highlight overhaul support, limited to only show highest highlight precedence
---------
Co-authored-by: Jaime Terreu <jaime@terreu.com>
Co-authored-by: Alexander Courtis <alex@courtis.org>
* feat(#1389): add next recursive for git and diag moves
The recurse opt can be used to directly go to the next item showing
git/diagnostic status recursively.
Signed-off-by: Antonin Godard <antoningodard@pm.me>
* refactor: status logic in single function
Rename get_status to status_is_valid.
Use status_is_valid function in multiple place to avoid duplicating
code.
Signed-off-by: Antonin Godard <antoningodard@pm.me>
* feat(#1389): add prev recursive for git and diag moves
Signed-off-by: Antonin Godard <antoningodard@pm.me>
* fix(#1389): next recursive: take root node into account
The root node cannot have a status. Previously if moving from the root
node, status_is_valid was trying to fetch the status from it and errored.
Signed-off-by: Antonin Godard <antoningodard@pm.me>
* fix(#1389): doc: remove show_on_open_dirs limitation
Signed-off-by: Antonin Godard <antoningodard@pm.me>
* feat(#1389): move find_node_line to utils
Signed-off-by: Antonin Godard <antoningodard@pm.me>
* feat(#1389): doc: note recursive moves are to files only, tidy
---------
Signed-off-by: Antonin Godard <antoningodard@pm.me>
Co-authored-by: Alexander Courtis <alex@courtis.org>