* feat(#2827): Multi Instance: Refactor: nvim-tree.live-filter
* refactor: all usages going through the explorer
* fix: api and filtration
* fix: style
* Update lua/nvim-tree/api.lua
Co-authored-by: Alexander Courtis <alex@courtis.org>
* docs: add missing live filter luadocs
---------
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
* 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>
* refactor: multi instance nvim-tree.explorer.sorters
* fix: linter errors
* fix: style
* fix: according to code review
* chore: removed comment
* fix: missing cfg params in sorters
* tidy following rebase
* tidy following rebase
---------
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>
* fix(#2813): enable file renaming in `nvim-tree` with changed capitalization
* fix(#2813): check if is macos
---------
Co-authored-by: Alexander Courtis <alex@courtis.org>
* fix(#2658): add all highlight groups to :NvimTreeHiTest
* fix(#2658): add all highlight groups to :NvimTreeHiTest
* fix(#2658): change SpellCap groups: ExecFile->Question, ImageFile->Question, SpecialFile->Title, Symlink->Underlined
* fix: bookmark filter include marked-directory's children
* fix(perf): add path_type to filter functions
* fix: replace undefined type
* fix: correct Node.fs_stat type
* fix: file info popup check fs_stat not nil
* refactor: add stat to should_filter, Node constructor
* perf: early return if bookmark is empty
---------
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>
* fix: bookmark filter should include parent directory
* fix: dont match mark's siblings
* fix: match mark from the start
---------
Co-authored-by: Alexander Courtis <alex@courtis.org>
* fix(#2395): marks.bulk.move defaults to directory at cursor
* fix(#2395): adds check if node_at_cursor.parent is nil
---------
Co-authored-by: Alexander Courtis <alex@courtis.org>
* Added creating of directories when renaming files
* Style check error? fixed
* Forgot, I added back the line of code that creates a directory named as the file and forgot to remove it
* Added a check for file already exists and also switched the is_error values as they were mismatched
* I don't know how but this somehow fixed the creation of a directory?
* 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>
* fix: live filter overlay width calculation
* refactor: simplify calculate_width return if not wininfo
---------
Co-authored-by: Alexander Courtis <alex@courtis.org>
* fix(#2507): icon in message after rename-file
* fix(#2507): icon in message after rename-file
---------
Co-authored-by: Alexander Courtis <alex@courtis.org>
* fix(#2467): remove newline in git paths
* fix: info size suffix and formatting (#2492)
- Now there is a whitespace between value and unit.
- Now values >= 1024 YiB are shown in YiB instead of B.
- To reuse same code a new local function was added: round().
* feat(#2312): fire `TextYankPost` event on path copy (#2489)
* feat(#2312): fire `TextYankPost` event on path copy
* stylua
* Bug fix
---------
Co-authored-by: Alexander Courtis <alex@courtis.org>
* 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>
* fix(#2467): remove newline in git paths
* fix(#2467): change cygpath calls to array format
To avoid shell compatibility issues in msys2 environment on Windows
* stylua nit
---------
Co-authored-by: Alexander Courtis <alex@courtis.org>
Co-authored-by: Andrew Voynov <37143421+Andrew15-5@users.noreply.github.com>
Co-authored-by: Azad <49314270+Akmadan23@users.noreply.github.com>
- Now there is a whitespace between value and unit.
- Now values >= 1024 YiB are shown in YiB instead of B.
- To reuse same code a new local function was added: round().
* feat(#2148): add rename_full in API
* feat(#2148): add default mapping 'u' for rename_full
---------
Co-authored-by: Alexander Courtis <alex@courtis.org>
* feat: notify [NvimTree] prefix is multiline only if the message is multiline
* feat: notify [NvimTree] prefix is multiline only if the message is multiline
* 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>
* fix: marks now align with nodes when parent nodes are empty and group_empty option
enabled
* run stylua
---------
Co-authored-by: Alexander Courtis <alex@courtis.org>
* fix(#2382): use --absolute-git-dir when available
* fix(#2382): use --absolute-git-dir when available
* fix(#2382): rename private git members, destroy git watchers on purge
* fix(#2382): consistent naming of toplevel
* fix(#2382): more doc and safety
* fix(#2382): consistent naming of toplevel
* fix(#2382): consistent naming of toplevel
* 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>
* Changed the default y/n prompt to default to N in most cases(all delete cases) and made it so that the copy paste same name conflict defaults to R(ename)
* Removed all No conditions as they are not used and not needed
* Made item_short into lowercase and also fixed prompts in dressing.nvim and telescope-select.nvim
* Fixed the exception which occurs on pressing esc in the prompt and also made rename to be blank or r.*/R.*
* Fix escape special characters on windows
fixes#2362
* use utils for windows check
* Add function to escape special chars on windows
* Change escape string function to use and/or
* Add nil check in escape special chars function
---------
Co-authored-by: Davis Sanders <dsanders@smartlink.city>
Co-authored-by: Alexander Courtis <alex@courtis.org>
* 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
* 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>
* fix(#1931): do not execute git status in git ignored directories
* fix(#1931): reload.refresh_node is always asynchronous
* fix(#2327): set parent folder ignore status following file update
* feat: Watch $GIT_DIR for git changes, if set
While rarely used, it's possible to set the $GIT_DIR environment
variable to instruct git to use a directory other than `.git`.
This checks if that environment variable is set; if it is, the plugin
will watch that directory. If it's not set, it'll fall back to the
default `.git` directory.
* fix: Don't create two watchers for $GIT_DIR
This will ignore a path for watching if EITHER it's '.git', or the value
of $GIT_DIR (if it's set).
If $GIT_DIR is not set, the vim.env object returns `nil`, which will
never match `path`.
* fix: Attempt to make a relative $GIT_DIR absolute
* feat: adds new type of sorting based on the filename's suffix
* chore(syntax): using string colon methods
* fix(regex): use alphanumeric match for extensions
* feat: adds new type of sorting based on the filename's suffix
---------
Co-authored-by: Alexander Courtis <alex@courtis.org>
* fix(extension/sorter): fallbacks to C.name when both exts are the same or nil
* fix(nil): files with no extension
* fix(nil): files with no extension
---------
Co-authored-by: Alexander Courtis <alex@courtis.org>
* feat: adds new type of sorting based on vim's filetype detection
* fix(ft/sorter): fallbacks to C.name when both ft's are nil or equal
* feat: adds new type of sorting based on vim's filetype detection
---------
Co-authored-by: Alexander Courtis <alex@courtis.org>
This fixes the issue described in #2243, where the .git folder's path
ends on a weird character produced by `cygpath` when the newline
character is fed into it (when using shell=powershell)
* refactor: move `reload` function into `utils` module
* docs: add annotations to `utils.focus_node_or_parent`
---------
Co-authored-by: Alexander Courtis <alex@courtis.org>
* feat(live-filter): focus selected node after clear
* fix(#1785): retain focused node on filter toggle
* fix(#1785): apply requested changes
* fix(live-filter): focus last focused node when cleared on prompt
* refactor: store last focused node in `view` module
* refactor: store last focused node in view module
---------
Co-authored-by: Alexander Courtis <alex@courtis.org>
* #2193 Add the ability to change the icon color for "symlink_formatted"
* Remove defaults and update doc #2198
---------
Co-authored-by: DoctorKnowsBetter <you@example.com>
Co-authored-by: Alexander Courtis <alex@courtis.org>