Commit Graph

1449 Commits

Author SHA1 Message Date
Alexander Courtis
6ad5c26f4d
feat(#2079): sort_by may return predefined sort (#2123)
* feat(#2079): prefactor

* feat(#2079): sort_by may return a predefined string
2023-04-15 15:53:40 +10:00
Alexander Courtis
56cdb5827d
fix(#1950): disable most API until nvim-tree setup has been called (#2125)
* fix(#1950): disable most API until nvim-tree setup has been called

* fix(#1950): disable most API until nvim-tree setup has been called
2023-04-15 15:52:07 +10:00
Eden Lentz
f3dbddf8b3
feat(renderer): add NvimTreeSymlinkFolderName (#2000)
* Added FolderSymlink color that is applied in builder.lua

* changed highlight names and links, changed folder build function

* remove NvimTreeSymlinkFolderName

---------

Co-authored-by: Alexander Courtis <alex@courtis.org>
2023-04-15 15:24:50 +10:00
Kasper Kondzielski
68f485b454
fix(#1697): remove notify plugin auto-detection (#2135)
* feat: Remove nvim-notify auto-detection

* feat: Remove nvim-notify auto-detection: stylua

---------

Co-authored-by: ghostbuster91 <ghostbuster91@users.noreply.github.com>
Co-authored-by: Alexander Courtis <alex@courtis.org>
2023-04-15 15:18:05 +10:00
Alexander Courtis
0a144ba50a
fix(#2109): floating help window (#2120)
* fix(#2109): floating help window

* fix(#2109): floating help window

* fix(#2109): floating help window

* fix(#2109): floating help window

* fix(#2109): floating help window

* fix(#2109): floating help window

* fix(#2109): floating help window

* fix(#2109): floating help window

* help float no border

Co-authored-by: gegoune <69750637+gegoune@users.noreply.github.com>

* Update lua/nvim-tree/help.lua

Co-authored-by: gegoune <69750637+gegoune@users.noreply.github.com>

* Update lua/nvim-tree/help.lua

Co-authored-by: gegoune <69750637+gegoune@users.noreply.github.com>

* Update lua/nvim-tree/help.lua

Co-authored-by: gegoune <69750637+gegoune@users.noreply.github.com>

* Update lua/nvim-tree/help.lua

Co-authored-by: gegoune <69750637+gegoune@users.noreply.github.com>

* fix(#2109): floating help window

* fix(#2109): floating help window

---------

Co-authored-by: gegoune <69750637+gegoune@users.noreply.github.com>
2023-04-15 14:59:30 +10:00
Alexander Courtis
b601b5aa25
fix(#2133): harden hide_root_folder deprecation (#2134) 2023-04-12 16:33:14 +10:00
Alexander Courtis
e16083cb01
deprecated(#1808): hide_root_folder (#2124) 2023-04-12 16:02:48 +10:00
Alexander Courtis
48d53a5934
feat(#1669): remove deprecated open_on_setup mechanisms (#2122) 2023-04-11 14:53:27 +10:00
Alexander Courtis
920d5c8f7e
fix(#2114): remove deprecated non-API from lib, events (#2121) 2023-04-11 12:11:38 +10:00
Alexander Courtis
086bf310bd
docs: complete API (#2115)
* doc: correct api.tree.expand_all

* doc: add Event.WillRenameNode

* doc: api git, events, live_filter, marks

* doc: api fs

* doc: api tidy

* doc: api index

* doc: api tidy

* doc: api index
2023-04-09 14:11:03 +10:00
Alexander Courtis
d1410cb089
docs: :help for api.node (#2106) 2023-04-04 16:32:32 +10:00
dependabot[bot]
94e3b09900
chore(deps): bump amannn/action-semantic-pull-request (#2107) 2023-04-03 13:18:42 +03:00
Alexander Courtis
0ef3d4613f
feat(#1974): experimental.git.async see https://github.com/nvim-tree/nvim-tree.lua/issues/2104 (#2094)
* async git watcher reload; callback hell for now

* async git watcher reload; revert unnecessary extractions

* async git watcher reload; callback and non-callback functions are required for sync codepaths that loop

* async git watcher reload

* async git watcher reload

* feat(#1974): experimental.git.async

* feat(#1974): experimental.git.async
2023-04-03 16:20:52 +10:00
gegoune
7ad1c204c4
fix: api.node.open.preview should toggle directories (#2099) 2023-04-03 09:20:23 +03:00
Alexander Courtis
0c9bfe7225
feat(#2092): add api.node.navigate.open.next, prev (#2093)
* feat(#2092): add api.node.navigate.open.next, prev

* feat(#2092): add api.node.navigate.listed.next, prev

* feat(#2092): add api.node.navigate.opened.next, prev

* feat(#2092): add api.node.navigate.opened.next, prev
2023-04-03 14:23:03 +10:00
gegoune
7cd722ff3a
ci: ensure PR subjects follow semantic commit spec (#2096) 2023-04-03 14:21:52 +10:00
Alexander Courtis
3e9509ec1b
fix(#2088): actions change dir enable false does not update tree root (#2095)
* fix(#2088): update tree root when actions.change_dir disabled

* fix(#2088): update tree root when actions.change_dir disabled
2023-04-03 13:07:11 +10:00
Alexander Courtis
45400cd7e0
feat(api): add api.commands.get (#2083)
* feat(commands): add descriptions

* Update lua/nvim-tree.lua

Co-authored-by: gegoune <69750637+gegoune@users.noreply.github.com>

* feat(commands): add descriptions, extract to commands.lua

* feat(commands): add descriptions, add api.get_commands

* feat(commands): add descriptions, api.get_commands -> api.commands.get

---------

Co-authored-by: gegoune <69750637+gegoune@users.noreply.github.com>
2023-03-28 10:52:48 +11:00
Pholawat
a38f9a55a4
fix(#2086): "Rename: Omit Filename" not removing file name (#2087) 2023-03-27 10:52:09 +11:00
Alexander Courtis
6319ad9405
fix(#2078): :NvimTreeFindFile focuses tree (#2080) 2023-03-26 15:34:26 +11:00
Alexander Courtis
886d852f6e
fix(#1858): deprecation warning for config.mappings.active and default (#2084) 2023-03-26 15:29:16 +11:00
Alexander Courtis
6515a1e1a9
fix(#2081): do not change root for inexistent files (#2082) 2023-03-26 15:05:41 +11:00
CsYakamoz
874b7be5d0
fix(diagnostics): coc obey diagnostics.severity (#2072)
`diagnostics.severity` option do not work with coc
2023-03-25 16:06:21 +11:00
EliasGill
31d8e24460
fix(#2057): update focused file on new terminal (#2060)
* Fixing #2057

* Update change-dir.lua

* Fixing error in force_dir_change
2023-03-25 14:50:22 +11:00
Zhizhen He
aa9971768a
doc: spelling (#2070) 2023-03-21 16:39:45 +11:00
Gaétan Lepage
a50723e35f
fix(doc): duplicate help tag in README (#2066) 2023-03-20 13:52:53 +02:00
Alexander Courtis
4f036342f1
feat(api): add api.config.mappings.get_keymap and get_keymap_default (#2056)
* feat(api): add api.config.mappings.get_keymap and get_keymap_default

* feat(api): add api.config.mappings.get_keymap and get_keymap_default
2023-03-20 11:23:45 +11:00
Alexander Courtis
1d79a64a88
doc: README installation points to wiki for plugin manager instructions (#2055) 2023-03-14 10:06:47 +11:00
Alexander Courtis
fe980baa94
feat(api): api.tree.find_file feature parity with open/toggle, convert all commands to API, document commands (#2039)
* fix(#1212): API find file feature parity

* fix(#2011): API find file feature parity

* fix(#2011): API find file feature parity

* fix(#2011): API find file feature parity

* fix(#2011): API find file feature parity

* fix(#2011): API find file feature parity

* fix(#2011): API find file feature parity

* fix(#2011): API find file feature parity
2023-03-13 16:53:20 +11:00
Alexander Courtis
f0a1c6ae2e fix(#1858): fire TreeAttachedPost event following on_attach call 2023-03-13 14:48:01 +11:00
gegoune
1830e5e8a4
feat(git): add TM git status (#2045)
* feat(git): add `TM` git status

Potential fix for #2043.

* fix: show as staged as well
2023-03-13 14:00:32 +11:00
Alexander Courtis
6e4b3b1868 doc: clarify setup() expense and purpose 2023-03-13 12:15:36 +11:00
Alexander Courtis
851ed88f29 doc: bug report points users to wiki for nvt-min.lua replication 2023-03-13 11:45:30 +11:00
Alexander Courtis
6001523c0a
doc: bug report points users to wiki for nvt-min.lua replication (#2051) 2023-03-13 11:44:00 +11:00
Alexander Courtis
bbb6d48910
feat(api): add api.config.mappings.default_on_attach (#2037) 2023-03-06 10:45:58 +11:00
Alexander Courtis
1b453441f4 doc: case sensitive rename is not possible on macOS with case insensitive file systems 2023-03-04 15:02:01 +11:00
Jeremy Goh
6117582578
fix: typo on clipboard notify (#2032) 2023-03-04 13:51:09 +11:00
Alexander Courtis
362ecbeed6 fix(#2024): revert removal of deprecated nvim-tree.config nvim_tree_callback 2023-02-28 09:10:13 +11:00
Alexander Courtis
59bcb01d3b fix(#2024): help handles empty mapping description 2023-02-27 20:28:10 +11:00
Alexander Courtis
74959750f7
feat: automated migration from view.mappings.list to on_attach, see https://github.com/nvim-tree/nvim-tree.lua/wiki/Migrating-To-on_attach (#1579)
* chore(mappings): migrate legacy mappings under the hood

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

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

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

* chore(mappings): add desc to all mappings

* chore(mappings): add desc to all mappings

* chore(mappings): escape help keys

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

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

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

This reverts commit f6f439ba59.

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

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

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

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

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

* chore(mappings): merge cleanup

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

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

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

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

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

* feat: Add highlight group for opened folder

closes #1674

* docs: Add NvimTreeOpenedFolderIcon default

* feat: Add NvimTreeClosedFolderIcon highlight group

Defaults to NvimTreeFolderIcon

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

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

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

* docs: Update feature_request.md (#1788)

* Update feature_request.md

Closes #1654

* Update feature_request.md

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

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

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

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

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

* 1786 semantic nit

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

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

* fixed git rename not showing up for the renamed file

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

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

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

* Using -z and removed unnecessary logic

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

* Update view.lua

* set cursorline to true

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

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

* feat(view): add filters.git_clean

* feat(view): add filters.git_clean

* feat(view): add filters.no_buffer

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

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

* feat(view): filters.no_buffer clarify targets

* feat: add placeholder filters.diagnostics_ok, refactor filters

* feat(view): remove placeholder filters.diagnostics_ok

* doc: consolidate and clarify :help examples

* doc: format help

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

* Fix default for file creation in closed directories

* Make paste in closed directories consistent with create

* doc: clarify create_in_closed_folder

* Remove create_in_closed_folder option

* doc: clarify create_in_closed_folder removal message (whoops)

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

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

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

* on_attach_default hardcoded

* format default_on_attach

* source default on_attach directly

* remove human mappings help

* simplified on_attach generation

* simplified on_attach generation

* generate default on_attach

* generate default on_attach

* split out keymap_legacy

* add recently introduced mappings

* legacy api.config.mappings.active and default

* legacy api.config.mappings.active and default

* on_attach help and readme

* legacy generate handles action = ""

* legacy generate handles action =

* legacy generate gives defaults when no user mappings

* legacy generate handles action = ""

* legacy generate api handles overrides

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

* add wiki link to generated on_attach

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

---------

Co-authored-by: kiyan <yazdani.kiyan@protonmail.com>
Co-authored-by: baahrens <bahrens@compeon.de>
Co-authored-by: Richard Li <38484873+chomosuke@users.noreply.github.com>
Co-authored-by: gegoune <69750637+gegoune@users.noreply.github.com>
Co-authored-by: rishabhjain9191 <rishabh.jain9191@gmail.com>
Co-authored-by: Anton <14187674+antosha417@users.noreply.github.com>
Co-authored-by: Eric Haynes <ehaynes99@gmail.com>
2023-02-27 14:19:50 +11:00
Alexander Courtis
9c97e6449b
fix(#1961): stop unnecessary find file refreshes, avoid find file refresh cycles (#2010) 2023-02-21 10:34:01 +11:00
Kai Ting
66c15afd13
fix(#2004): relative path detection handles regex magic (#2005)
* fix(#2004): Change path_relative to use string find and substring to avoid using regex.

- This removed the original gsub with unintentional captures in path_to_matching_str
- The original regex based code captures create a limit where input path cannot
  have more than 32 special charactors ( `.`  , `_` or `-`)

* style nit

---------

Co-authored-by: Alexander Courtis <alex@courtis.org>
2023-02-20 10:15:42 +11:00
Alexander Courtis
04f99f14b5
fix(#2003): obey user split command for modified buffers when hidden not set (#2008) 2023-02-20 10:04:55 +11:00
Alexander Courtis
bcb969c869
doc(#1997): clarify renderer.highlight_ and correct highlight group names (#2007) 2023-02-19 11:24:35 +11:00
Alexander Courtis
08a0aa1a3b Revert "fix(#1961): cycle detection on refresh, preventing infinite loop (#1996)"
This reverts commit 4222bb875d.
2023-02-15 09:24:12 +11:00
Alexander Courtis
4222bb875d
fix(#1961): cycle detection on refresh, preventing infinite loop (#1996)
* #1961 diagnostic logging refresh_nodes_for_path

* #1961 add cycle detection to refresh_nodes_for_path

* #1961 escape special characters on when path matching during refresh

* #1961 escape special characters on when path matching during refresh
2023-02-14 15:08:41 +11:00
Alexander Courtis
8b8d457e07
fix(#1993): always fire TreeOpen event (#1994) 2023-02-13 14:57:01 +11:00
Alexander Courtis
ba1778e061
fix(#1923): handle empty git icons (#1987) 2023-02-13 10:32:02 +11:00
Alexander Courtis
36e29c3a95
fix(#1970): disable git integration after 5 timeouts (#1990)
* fix(#1970): additional log function gating for efficiency when not logging

* fix(#1970): additional log function gating for efficiency when not logging

* fix(#1970): disable git integration after 10 timeouts

* fix(#1970): disable git integration after 10 timeouts

* fix(#1970): disable git integration after 10 timeouts

* fix(#1970): cleanly kill timed out git processes

* fix(#1970): revert git kill, to be completed via #1974 experiment

* fix(#1970): revert git kill, to be completed via #1974 experiment
2023-02-12 14:28:48 +11:00
Alexander Courtis
b712b82b0c
fix(#1961): harden profiling functions (#1986) 2023-02-11 17:05:01 +11:00