Denys Lytviak
f7c09bd72e
feat: add api.tree.toggle_enable_filters ( #2706 )
...
* feat: toggle filters
* naming refactoring
* change name to enable
* fix default opt
* fix api name
* update doc
* remove default keybinding, toggle live filter
* add API doc
---------
Co-authored-by: Alexander Courtis <alex@courtis.org>
2024-03-16 12:35:13 +11:00
Rami Elwan
8f2a50f1cd
feat: add api.fs.copy.basename, default mapping ge ( #2698 )
...
* feat: add copy basename
* fix: change keymap for copy basename
* fix: use double quotes
* fix: add missing help
---------
Co-authored-by: Alexander Courtis <alex@courtis.org>
2024-03-14 16:57:46 +11:00
Alexander Courtis
d52fdeb0a3
docs: add help indexes ( #2684 )
...
* docs: add nvim-tree-index-api
* docs: add nvim-tree-index-opts
* docs: add nvim-tree-index-api
* docs: sort indices
* docs: less verbose
* docs: use dictionary sort for indices
2024-02-24 17:53:25 +11:00
Alexander Courtis
7efaa339d3
docs: :help nvim-tree-legacy ( #2679 )
...
doc: add help nvim-tree-legacy
2024-02-24 15:50:10 +11:00
Alexander Courtis
030defdb65
docs: add highlight examples to quickstart, document pre-overhaul SpellCap groups ( #2680 )
...
* docs: add highlight examples to quickstart, document pre-overhaul SpellLocal groups
* docs: add highlight examples to quickstart
* docs: document pre-overhaul SpellCap groups
* docs: document pre-overhaul SpellCap groups
2024-02-20 13:24:37 +11:00
darcy
4a87b8b46b
feat( #2654 ): filters.custom may be a function ( #2655 )
...
* 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>
2024-02-11 17:18:40 +11:00
Alexander Courtis
b278fc25ae
feat( #2415 ): add :NvimTreeHiTest ( #2664 )
...
* feat(#2415 ): add :NvimTreeHiTest
* feat(#2415 ): split out appearance diagnostics
2024-02-11 14:41:40 +11:00
Zeta
8cbb1db8e9
feat: add node.open.toggle_group_empty, default mapping L ( #2647 )
...
* 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>
2024-02-04 16:48:56 +11:00
Confidenceman02
f39f7b6fcd
fix( #2415 ): nvim 0.8 highlight overhaul support, limited to only show highest highlight precedence ( #2642 )
...
* 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>
2024-01-30 10:37:32 +11:00
Alexander Courtis
d9cb432d2c
fix( #2415 ): disambiguate highlight groups, see :help nvim-tree-highlight-overhaul ( #2639 )
...
* fix(#2415 ): disambiguate highlight groups, see :help nvim-tree-highlight-overhaul
* fix(#2415 ): disambiguate highlight groups, see :help nvim-tree-highlight-overhaul
* fix(#2415 ): disambiguate highlight groups, see :help nvim-tree-highlight-overhaul
* fix(#2415 ): disambiguate highlight groups, see :help nvim-tree-highlight-overhaul
* fix(#2415 ): disambiguate highlight groups, see :help nvim-tree-highlight-overhaul
* fix(#2415 ): disambiguate highlight groups, see :help nvim-tree-highlight-overhaul
* fix(#2415 ): disambiguate highlight groups, see :help nvim-tree-highlight-overhaul
2024-01-29 12:43:02 +11:00
Alexander Courtis
e9c5abe073
feat( #2415 ): colour and highlight overhaul, see :help nvim-tree-highlight-overhaul ( #2455 )
...
* feat(#2415 ): granular highlight_diagnostics, normalise groups (#2454 )
* chore: normalise colours and enable cterm (#2471 )
* feat(#2415 ): granular highlight_git, normalise git groups (#2487 )
* docs: update CONTRIBUTING.md (#2485 )
* feat(#2415 ): granular highlight_git, normalise git groups
* feat(#2415 ): normalise and add modified groups
* feat(#2415 ): create Decorator class for modified and bookmarks
* feat(#2415 ): create DecoratorDiagnostics
* feat(#2415 ): create DecoratorGit
* feat(#2415 ): create DecoratorGit
* add DecoratorCopied DecoratorCut
* add DecoratorOpened
* remove unloaded_bufnr checks as the view debouncer takes care of it
* Add `renderer.highlight_git` to accepted strings
* fix(#2415 ): builder refactor (#2538 )
* simplify builder signs
* decorators take care of themselves and are priority ordered
* simplify builder hl groups
* refactor builder for icon arrays
* builder use decorators generically
* fix(#2415 ): harden sign creation (#2539 )
* fix(#2415 ): harden unicode signs
* Decorator tidy
* normalise git sign creation and tidy
* tidy builder
* NvimTreeBookmarkIcon
* tidy HL doc
* tidy HL doc
* tidy HL doc
* tidy builder doc
* standardise on '---@param'
* DiagnosticWarning -> DiagnosticWarn
* annotate decorators
* limit to two highlight groups for line rendering
* style
* apply #2519
* feat(#2415 ): combined hl groups (#2601 )
* feat(#2415 ): create combined highlight groups
* feat(#2415 ): create combined highlight groups
* feat(#2415 ): create combined highlight groups
* ci: allow workflow_dispatch (#2620 )
* one and only one hl namespace, required winhl removal
* small tidies
* colors.lua -> appearance.lua
* full-name uses one and only namespace
* don't highlight fast, just apply to namespace, safer win_set_hl
* gut builder (#2622 )
collapse Builder
* fix group_empty function check
* feat(#2415 ): highlight-overhaul release date
---------
Co-authored-by: Akmadan23 <azadahmadi@mailo.com>
2024-01-20 16:12:13 +11:00
Antonin Godard
5d13cc8205
feat( #1389 ): api: recursive node navigation for git and diagnostics ( #2525 )
...
* 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>
2024-01-07 09:08:58 +11:00
Devansh Sharma
dc839a72a6
feat: add kind param to vim.ui.select function calls ( #2602 )
...
* feat: add kind param to vim.ui.select function calls
* feat: add kind param to prompts for bookmark actions
* docs: add section for prompts
* docs: add section for prompts
---------
Co-authored-by: Alexander Courtis <alex@courtis.org>
2023-12-31 15:37:16 +11:00
Azad
50f30bcd8c
feat: add option to skip gitignored files on git navigation ( #2583 )
...
* feat: add option to skip gitignored files on git navigation
* Add API bindings
* stylua: ignore
2023-12-19 11:29:01 +01:00
Alexander Courtis
8f92e1edd3
feat( #1850 ): add "no bookmark" filter ( #2571 )
...
* feat(#1850 ): add no bookmark filter
* feat(#1850 ): add no bookmark filter - style
2023-12-19 16:18:24 +11:00
Alexander Courtis
7e5c673180
docs( #285 ): clarify api.fs.create directory creation ( #2572 )
...
docs(#285 ): clarify api.fs.create directory creation
2023-12-04 11:32:03 +11:00
Alexander Courtis
d5cc938ab0
refactor: api and command focus call tree.open(), soft deprecate tree.focus()
2023-11-27 14:24:55 +02:00
Alexander Courtis
db796fc74e
docs: complete API calls for commands ( #2556 )
...
doc: complete API calls for commands
2023-11-25 13:21:34 +11:00
John Hui
8c534822a7
feat( #2544 ): add api.tree.winid ( #2545 )
...
* feat(#2544 ): add API for querying win ID, api.tree.winid()
* Document winid() opts
Co-authored-by: Alexander Courtis <alex@courtis.org>
* Fix winid() docs
Co-authored-by: Alexander Courtis <alex@courtis.org>
* Handle case where tabpage = 0
---------
Co-authored-by: Alexander Courtis <alex@courtis.org>
2023-11-21 16:04:43 +11:00
Azad
a2aaf8b430
feat( #2515 ): add option to change grouped folders name with custom function ( #2521 )
...
* Add option to change grouped folders name with custom function
* Fix docs
---------
Co-authored-by: Alexander Courtis <alex@courtis.org>
2023-11-09 11:20:29 +01:00
Azad
c1568568b3
feat( #2498 ): delete, trash prompts default N, added ui.confirm.default_yes option to override this behaviour ( #2500 )
...
Co-authored-by: Alexander Courtis <alex@courtis.org>
2023-10-30 12:28:29 +11:00
Azad
78a9ca5ed6
feat: mapping and options to sort entries in help window ( #2482 )
...
* feat: add option to sort entries in help window
* stylua
* Add keymap to toggle sorting methods
* Bug fix
---------
Co-authored-by: Alexander Courtis <alex@courtis.org>
2023-10-23 08:57:49 +11:00
Alexander Courtis
db8145c27d
fix( #2459 ): disable cygwin git support by default, see :help nvim-tree.git.cygwin_support to enable ( #2486 )
2023-10-21 16:34:34 +11:00
Alexander Courtis
40b9b887d0
fix( #2473 ): remove problematic <S-Tab> default mapping ( #2475 )
2023-10-17 10:00:56 +11:00
umlx5h
aaee4cd896
feat: api.node.open.preview_no_picker with default mapping <S-Tab> ( #2464 )
...
* feat: add preview with no window picker action
* feat: preview_no_window_picker -> preview_no_picker
---------
Co-authored-by: Alexander Courtis <alex@courtis.org>
2023-10-15 14:04:04 +11:00
Benoit Charles
0882354517
feat( #2148 ): api.fs.rename_full ( #2461 )
...
* feat(#2148 ): add rename_full in API
* feat(#2148 ): add default mapping 'u' for rename_full
---------
Co-authored-by: Alexander Courtis <alex@courtis.org>
2023-10-15 13:40:40 +11:00
Bram Reyniers
e153d9f599
fix( #2440 ): view.width.padding may be a number or function returning a number ( #2442 )
...
* fix validation view.width.padding
* fix docs for view.width.padding
* fix docs for view.width.padding
---------
Co-authored-by: Alexander Courtis <alex@courtis.org>
2023-10-07 12:21:13 +11:00
Alexander Courtis
7dcda5d3b6
doc( #2440 ): view.width.padding may only be a string ( #2441 )
2023-10-02 14:38:11 +11:00
Alexander Courtis
07eb5b4059
docs: notify deprecated hide_root_folder ( #2431 )
2023-09-24 15:15:19 +10:00
Alexander Courtis
d49a284236
feat( #2411 ): add renderer.highlight_bookmarks, renderer.icons.bookmarks_placement ( #2412 )
...
* feat(#1079 ): add highlight NvimTreeCopiedText and NvimTreeCutText
* feat(#1079 ): add highlight NvimTreeCopiedText and NvimTreeCutText
* feat(#1079 ): node may not be present in copy and cut
* feat(#2411 ): bookmark highlight and icon placement
* feat(#1079 ): add renderer.highlight_clipboard
* feat(#1079 ): add renderer.highlight_clipboard
* feat(#2411 ): bookmark highlight and icon placement
* feat(#2411 ): bookmark highlight and icon placement
* style
* feat(#2411 ): bookmark highlight and icon placement
* feat(#2411 ): bookmark highlight and icon placement
* feat(#2411 ): bookmark highlight and icon placement
* feat(#2411 ): bookmark highlight and icon placement
2023-09-24 15:07:02 +10:00
Azad
914a6868cb
docs: add missing quotes ( #2424 )
2023-09-23 12:06:48 +10:00
Alexander Courtis
a3aa3b47ea
feat( #1079 ): add renderer.highlight_clipboard default name, defaults to undercurls ( #2410 )
...
* feat(#1079 ): add highlight NvimTreeCopiedText and NvimTreeCutText
* feat(#1079 ): add highlight NvimTreeCopiedText and NvimTreeCutText
* feat(#1079 ): node may not be present in copy and cut
* feat(#1079 ): add renderer.highlight_clipboard
* feat(#1079 ): renderer.highlight_clipboard takes options, style cut/copy HL
* feat(#1079 ): renderer.highlight_clipboard takes options, style cut/copy HL
* feat(#1079 ): use an enum for highlight position
* feat(#1079 ): diagnostics uses _append_highlight
2023-09-17 16:08:04 +10:00
pr4th4m
7f7665a17b
feat: api.marks.bulk.trash ( #2391 )
...
* Feature: Bulk trash api
* Update docs
* Follow documentation syntax
* Remove unnecessary refresh
* doc spacing
---------
Co-authored-by: Alexander Courtis <alex@courtis.org>
2023-09-16 15:10:36 +10:00
Alexander Courtis
b7f6600bc2
feat( #2197 ): git and diagnostics folder highlight groups ( #2409 )
...
* feat(#2197 ): add git folder highlight groups
* feat(#2197 ): add diagnostics folder highlight groups
2023-09-09 15:13:14 +10:00
Alexander Courtis
8f48426c88
feat( #2316 ): add NvimTreeFolderArrowClosed NvimTreeFolderArrowOpen ( #2408 )
2023-09-09 14:21:25 +10:00
Alexander Courtis
33c3bc562b
feat( #2398 ): add NvimTreeOpenedFileIcon ( #2407 )
2023-09-09 13:31:40 +10:00
Alexander Courtis
277632fbd9
docs: enhance quickstart, document git timeouts ( #2400 )
...
* doc: clarify git and remove bookmarks
* doc: break up quickstart
2023-09-03 16:36:37 +10:00
Alexander Courtis
a2b6e5ad2a
docs: help sections and tidy ( #2399 )
...
* doc: add nvim-tree-options, sort root level options
* doc: reorder default options, add sections
* doc: collapse opts spacing and tidy
* doc: tidy highlight groups
2023-09-03 15:52:33 +10:00
Alexander Courtis
323f65cb9c
feat( #1917 ): add diagnostic highlighting and icon placement ( #2396 )
...
* feat(#1917 ): add renderer.highlight_diagnostics
* feat(#1917 ): add renderer.highlight_diagnostics
* feat(#1917 ): add enderer.icons.diagnostics_placement
* feat(#1917 ): add renderer.icons.show.diagnostics
* feat(#1917 ): document highlight overrides
2023-09-03 12:29:33 +10:00
Antonio Sarosi
b144b33390
feat( #2369 ): add full renderer.icons.web_devicons options for file and folder ( #2375 )
...
* Add `webdev_colors_folder` option
* Check if `M.devicons` exists
* Refactor `get_folder_icon`
* Add configuration options for both files and folders
* web_devicons.*.enabled -> enable
* silent migration: renderer.icons.webdev_colors -> renderer.icons.web_devicons.file.color
* silent migration: renderer.icons.webdev_colors -> renderer.icons.web_devicons.file.color
---------
Co-authored-by: Alexander Courtis <alex@courtis.org>
2023-08-26 14:42:44 +10:00
Azad
d11d701857
feat( #2364 ): add option to sort files first ( #2366 )
...
* feat(#2364 ): add option to show files first
* Refactor `folders_or_files_first` function
* Improve readability
* Remove `fallback` from `folders_or_files_first` function
---------
Co-authored-by: Alexander Courtis <alex@courtis.org>
2023-08-26 14:15:56 +10:00
Devansh Sharma
dea82ae207
docs: fix typo in API Node section ( #2381 )
2023-08-18 23:54:16 +02:00
Alexander Courtis
18c7a31198
chore: remove legacy view.mappings.list ( #2371 )
2023-08-14 17:41:55 +10:00
Alexander Courtis
116b88564f
chore: use stdpath "log" rather than "cache" ( #2372 )
2023-08-14 11:03:38 +10:00
Alexander Courtis
0a54dcb76b
fix: trash.cmd defaults to 'trash' on macos and windows, document option ( #2336 )
...
* fix: trash.cmd defaults to 'trash' on macos
* fix: macOS and windows default trash commands, allow trash on all OS
* fix: windows default trash command doc
* fix: trash.cmd message
2023-08-13 12:18:06 +10:00
Alexander Courtis
6c3ddcbc10
doc: sort.sort_folders_first -> sort.folders_first ( #2355 )
2023-08-06 10:50:51 +10:00
Danila Usachev
4bd30f0137
feat: add actions.open_file.eject ( #2341 )
...
* feat: added prevent_buffer_override option to allow in-place opens by :e
* Moved option check inside the callback
* Renamed option to eject
2023-07-29 17:45:03 +10:00
linrongbin16
75c05742bc
feat(trash): add synchronized trash support for windows ( #2335 )
...
* feat(trash): support 'trash' on Windows
* feat(trash): need sync wait on Windows to avoid switch to other app from nvim process
* doc: remove 'Only available for UNIX'
* doc(trash): highlight 'Trash' on Windows is syncrhonized
* doc(trash): highlight 'trash' on Windows is synchronized
* doc(trash): remove dot
* fix(trash): check for unix and windows
* fix(trash): comment
---------
Co-authored-by: Alexander Courtis <alex@courtis.org>
2023-07-29 17:34:47 +10:00
Stefano Stoduto
3b62c6bf2c
feat(event): add TreeRendered ( #2324 )
...
* add TreeRendered event
* pass bufnr and winnr to TreeRendered event
---------
Co-authored-by: Alexander Courtis <alex@courtis.org>
2023-07-16 17:22:45 +10:00
Alexander Courtis
697bfaccac
feat: add filters.git_ignored (prev git.ignore), apply "Toggle Filter:" prefix to mapping descriptions ( #2325 )
2023-07-16 13:26:03 +10:00