Mateusz Russak
fa051cf990
refactor( #2826 ): multi instance nvim-tree.view
2024-08-04 13:31:11 +02:00
Mateusz Russak
e2853ee4fb
Merge branch 'master' into live-filter-multiinstace
2024-08-04 11:19:06 +02:00
Mateusz Russak
9deac32a40
refactor: all usages going through the explorer
2024-07-28 10:16:02 +02:00
Everton Jr.
48d0e82f94
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>
2024-07-28 13:26:22 +10:00
Mateusz Russak
908478a0e0
refactor( #2828 ): multi instance nvim-tree.explorer.filters ( #2841 )
...
* refactor(#2828 ): multi instance nvim-tree.explorer.filters
* fix: style
* fix: apply suggestions from code review
Co-authored-by: Alexander Courtis <alex@courtis.org>
---------
Co-authored-by: Alexander Courtis <alex@courtis.org>
2024-07-27 13:29:27 +10:00
Everton Jr.
48a9290757
feat: add renderer.highlight_hidden, renderer.icons.show.hidden and renderer.icons.hidden_placement for dotfile icons/highlights ( #2840 )
...
* 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>
2024-07-21 16:00:34 +10:00
Alexander Courtis
b2640685a8
Revert "feat( #2349 ): add "right_align" option for renderer.icons.*_placement ( #2839 )"
...
This reverts commit 1d629a5d3f .
2024-07-21 15:22:24 +10:00
Everton Jr.
1d629a5d3f
feat( #2349 ): add "right_align" option for renderer.icons.*_placement ( #2839 )
...
* 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>
2024-07-21 14:49:10 +10:00
Epheien
869c064721
feat( #2127 ): add experimental.actions.open_file.relative_path to open files with a relative path rather than absolute ( #2805 )
...
* temp workaround for issue #2803
* fix #2127 and #2803
* chore(#2127 ): read the configuration correctly
* feat(#2127 ): add help
* feat(#2127 ): normalise relative_path in config hierarchy
* feat(#2127 ): update help
---------
Co-authored-by: eph <eph@MacBook-Pro.local>
Co-authored-by: Alexander Courtis <alex@courtis.org>
2024-07-07 12:51:43 +10:00
Alexander Courtis
8b2c5c678b
feat( #2799 ): filesystem_watchers.ignore_dirs and git.disable_for_dirs may be functions ( #2800 )
...
feat(#2799 ): filesystem_watchers.ignore_dirs and git.disable_for_dirs may be functions
2024-06-23 11:44:45 +10:00
Alexander Courtis
8704b6f7fc
chore( #2787 ): minimum nvim version 0.9, replace 0.10 deprecated, enable deprecated warnings ( #2788 )
...
* refactor(#2787 ): replace deprecated
* refactor(#2787 ): enable deprecated checks
* refactor(#2787 ): replace deprecated
* refactor(#2787 ): replace deprecated
* refactor(#2787 ): replace deprecated
* refactor(#2787 ): replace deprecated
* refactor(#2787 ): use inline deprecation disabling
* refactor(#2787 ): replace deprecated
* refactor(#2787 ): replace deprecated
* refactor(#2787 ): replace deprecated
* refactor(#2787 ): replace deprecated
* refactor(#2787 ): replace deprecated
* refactor(#2787 ): replace deprecated
* refactor(#2787 ): replace deprecated
* refactor(#2787 ): replace deprecated
* refactor(#2787 ): replace deprecated
* refactor(#2787 ): deprecated are now warnings
* refactor(#2787 ): 0.9 is the minimum supported version
* Revert "refactor(#2787 ): replace deprecated"
This reverts commit b6b4c32fcb .
* refactor(#2787 ): suppress deprecated until 0.11
* refactor(#2787 ): minimum nvim version 0.8 -> 0.9
* refactor(#2787 ): reset globals
* refactor(#2787 ): explicitly check for vim.diagnostic.is_enabled function presence
2024-06-09 12:24:35 +10:00
Ava Harris
e20966ae55
feat: add update_focused_file.exclude ( #2673 )
...
* 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>
2024-03-25 15:41:05 +11:00
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
DB
041dbd18f4
fix: searchcount exception on invalid search regex ( #2693 )
...
* fix: wrap searchcount in pcall to avoid error
* fix: searchcount in pcall
---------
Co-authored-by: xVermillionx <xVermillionx@notvalid>
2024-03-09 13:27:23 +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
fbee8a69a4
fix( #2643 ): correctly apply linked highlight groups in tree window ( #2653 )
...
* fix(#2643 ): correctly apply linked highlight groups in tree window
* fix(#2643 ): recreate and apply combined highlight groups on colorscheme change
2024-01-29 12:42:19 +11:00
Alexander Courtis
7bdb220d0f
fix( #2637 ): show buffer modified icons and highlights ( #2638 )
2024-01-21 17:24:43 +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
Azad
f779abaf2a
refactor: improve API readability and tidy actions submodules ( #2593 )
...
* refactor: improve API readability, tidy actions modules
* Apply requested changes
* `actions/reloaders/reloaders.lua` -> `actions/reloaders.lua`
---------
Co-authored-by: Alexander Courtis <alex@courtis.org>
2023-12-31 15:52:27 +11:00
geril2207
02ae52357b
fix: hijack_cursor on update focused file and vim search ( #2600 )
...
refactor: hijack_cursor search skip
2023-12-31 14:40:58 +11: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
0a7c24b675
fix( #2568 ): hijack_cursor positions at top grouped node ( #2569 )
...
Co-authored-by: Azad <49314270+Akmadan23@users.noreply.github.com>
2023-12-10 00:13:22 +01:00
Alexander Courtis
27e66c2ea8
refactor( #1645 ): remove unused open_replacing_current_buffer ( #2570 )
2023-12-09 12:18:57 +11:00
Azad
13f967f8e7
chore: add type annotations and resolve LSP warnings ( #2555 )
...
* chore: add type annotations to (almost) all functions
* stylua
* Add classes for symlink nodes
* Replace deprecated `@vararg`
* Move node classes to `node` module
* Fix `Symlink*` classes
* add vim and libuv runtime for luals, qualify libuv types
* add scripts/luals-check, not quite ready for CI
* additional nil checks for git/init.lua and git/runner.lua
* additional nil checks for nvim-tree.lua
* wrap vim.cmd-as-a-function calls inside functions
* vim.tbl_filter predicate returns booleans
* Revert "add scripts/luals-check, not quite ready for CI"
This reverts commit c70229cad9 .
* Add `MinimalNode` class in `marks` module
* Fix various LSP warnings
* stylua
* Fix `Explorer` class, update related annotations and add necessary checks
* Add missing annotations to `live-filter`
* Add temporary aliases for `uv.*` types
* Resolve remaining LSP warnings
* Revert changes not related to internal types
* Minor adjustments
* Update doc comments style
* Minor adjustments (pt. 2)
---------
Co-authored-by: Alexander Courtis <alex@courtis.org>
2023-12-09 11:34:35 +11:00
Azad
05f55c1fd6
chore: remove TreeExplorer global variable ( #2561 )
2023-11-28 10:39:52 +01:00
Alexander Courtis
d5cc938ab0
refactor: api and command focus call tree.open(), soft deprecate tree.focus()
2023-11-27 14:24:55 +02:00
Azad
874ae6e944
fix: reload tree on BufEnter if cwd is different ( #2527 )
...
Co-authored-by: Alexander Courtis <alex@courtis.org>
2023-11-12 13:14:32 +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
53b0bcaada
chore: stylua column width 120 -> 140 ( #2448 )
...
* chore: stylua column width 120 -> 140
* chore: stylua column width 120 -> 140, tidy
* Revert "chore: stylua column width 120 -> 140, tidy"
This reverts commit 8a0524d6bd .
* chore: stylua column width 120 -> 140, tidy watcher.lua
* chore: stylua column width 120 -> 140, tidy diagnostics.lua
* chore: stylua column width 120 -> 140, tidy git.lua
* chore: stylua column width 120 -> 140, tidy open-file.lua
* chore: stylua column width 120 -> 140, tidy system-open.lua
* chore: stylua column width 120 -> 140, tidy runner.lua
2023-10-08 11:40:58 +11:00
Azad
85abe29396
feat: use virtual title in notifications if title is not supported ( #2439 )
...
* feat: use virtual title in notifications if title is not supported
* Fix boolean expressions
* Replace `pcall` with `package.loaded`
* Detect title support before sending notification
* Prevent `title_support` from being nil after evaluation
* temporary stylua suppression
---------
Co-authored-by: Alexander Courtis <alex@courtis.org>
2023-10-07 12:40:39 +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
Azad
113e0950c8
feat: split startup warning messages into multiple lines ( #2436 )
2023-10-01 12:51:49 +11:00
Azad
ce3495bd4c
fix: schedule notifications to avoid UI freeze on startup ( #2432 )
...
* fix: schedule notifications to avoid UI freeze on startup
* stylua
2023-09-26 08:41:23 +10: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
ea147418e0
feat: validate all option types ( #2414 )
...
* refactor: follow config structure for `ACCEPTED_TYPES`
* Bug fix
* Fix check for default values
* Reduce error notifications verbosity
* Address issues introduced previously
* stylua
---------
Co-authored-by: Alexander Courtis <alex@courtis.org>
2023-09-23 14:56:17 +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
Alexander Courtis
94c7c810af
Revert "fix: ensure startup warnings are visible with a multiline message, to work around https://github.com/neovim/neovim/issues/17832 planned for fix in nvim 0.10 ( #2387 )"
...
This reverts commit 807dc05156 .
2023-09-10 10:38:49 +10:00
Azad
51f02366de
feat: validate some option string values ( #2404 )
...
* Add check for accepted strings in user opts
* option failures point to :help nvim-tree-opts
---------
Co-authored-by: Alexander Courtis <alex@courtis.org>
2023-09-09 11:07:06 +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
Alexander Courtis
807dc05156
fix: ensure startup warnings are visible with a multiline message, to work around https://github.com/neovim/neovim/issues/17832 planned for fix in nvim 0.10 ( #2387 )
2023-08-26 13:40:25 +10:00
Alexander Courtis
18c7a31198
chore: remove legacy view.mappings.list ( #2371 )
2023-08-14 17:41:55 +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
Danila Usachev
0a89dcb464
fix( #2343 ): tree is now correctly abandoned upon an in-place open with eject=false ( #2344 )
2023-08-01 10:53:58 +10:00