* #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>
* feat: add `NormalFloat` hl for floating windows
* fix: follow default floatwin bg color
---------
Co-authored-by: Alexander Courtis <alex@courtis.org>
* 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>
* 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
* 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>
* 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
* fix: variable width accounts for sign/number columns
* Add dynamic sizing padding options
with https://github.com/neovim/neovim/pull/20621 merged in it is now
possible to fully customize the status-column in nvim (the column on the
left containing line-numbers, fold info, signs and borders).
A fair few cool implementations have popped up like:
- https://github.com/CKolkey/config/blob/master/nvim/after/plugin/statuscolumn.lua
- https://github.com/luukvbaal/statuscol.nvim
- and my own personal one (based on CKolkey's fantastic work) https://git.hendrikpeter.net/hendrikpeter/pico-vim/-/blob/main/lua/peva/status_column.lua
The problem with nvim-tree however is that dynamic sizing doesn't take
the custom size of a status column into account and the end of file
names get clipped off. This little patch should fix that (and give some
examples to help other status_column modders get started).
Thanks for looking at this and thanks for making this amazing plugin,
I've been using it for a while and I really like it!
* allow padding function, update docs, rollback readme
* typo in example setup
* help formatting
---------
Co-authored-by: Alexander Courtis <alex@courtis.org>
* feat: max_width for adaptive_size
* view grow calculates size correctly based on sign column visibility
* limit width to a minimum of 20
* adaptive_size -> min/max table
* harden view size calculations against bad user input
* style
* add back an extra column of padding to adaptive resizing
* back out: limit width to a minimum of 20
* revert unnecessary change
* backout: view grow calculates size correctly based on sign column visibility
* remove adaptive_size from help
* backout unnecessary change M.View.config
Co-authored-by: Alexander Courtis <alex@courtis.org>
* fix(#1836):add view.debounce_delay to avoid some unnecessary explorer reloads
* fixed BufReadPost & BufUnload nil pointer
* update_focused_file.debouce_delay to view.debounce_delay
* changed docs to be more accurate
* added debounce on modified update
* Using same event for filter buffer
* removed unused View.debounce_delay
* changed docs to be more accurate
Co-authored-by: doot <gugegby@gmail.com>
Co-authored-by: Alexander Courtis <alex@courtis.org>
* Outlined new options
* highlight_modified is highlight_opened_files
* prototype with autocmd
* moved modified into glyphs
* show_on_dirs and show_on_open_dirs
* icon placement before & after
* _get_filename_offset
* fixed :wq doesn't update modified indicator
* highlight_modified, signcolumn modified_placement
Refactored to make everything use HighlightedString to remove all the complex `insert_highlight` calculation.
Not tested.
* updated doc to match the reality of no multi char for glyphs.modified
* fixed git signcolumn doesn't show
* fixed highlight_modified gets replaced by highlight_opened_files
* fixed renderer.icons.show.modified = false crash
* updated doc to reflect empty icon not breaking rendering
* removed debounce_delay to implement in a later PR
* doc nit: order placement
* change modified dirs default to be consistent with git
* illegal git & modified placement changed to default
* don't assume icon exist
* nit remove comment
* Noted in doc that glyphs can't have more than 2 characters if in signcolumn
* Don't sign_define if placement isn't signcolumn
Co-authored-by: Alexander Courtis <alex@courtis.org>
* feat(#1814): added cursorline config to DEFAULT_OPTS
Extends #1814
Currently, the config cursorline is set to `true` by default.
This behaviour can only be changed by a hacky way of listening to an event, as @alex-courtis mentioned that: "The user can change this default if they want via event".
This PR generalizes the configuration to be easier to config via the function `setup()`.
* doc: add cursorline
Co-authored-by: Alexander Courtis <alex@courtis.org>