Commit Graph

433 Commits

Author SHA1 Message Date
Richard Li
dcc344cc72
feat(view): indicate modified buffers (#1835)
* 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>
2022-12-31 15:54:04 +11:00
youkwhd
9ad93b6ac0
feat(view): add view.cursorline (#1859)
* 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>
2022-12-31 15:27:31 +11:00
Alexander Courtis
3c4958ab3d
fix(#1831): remove windows executable functionality due to occasional vim freeze and performance concerns (#1868)
* #1831 exploratory testing: disable file executable checks

* fix(#1831): remove windows executable functionality
2022-12-31 12:34:55 +11:00
Richard Li
29788cc32a
fix(git): git folder fixes and improvements (#1809)
* coding style

* outlined git.show_on_open_dirs behavior

* show some icon on opendir even if show_on_open_dir=false

and show all children's status on parent

* fixed renamed icon not showing

* sorted icons

* removed DU from deleted as file will show up in tree

* fixed update_git_status in reloaders not tested

* fixed Api.git.reload()

Tested update_git_status in reloaders.lua

* sort icon only if not git signcolumn

* fixed crashing when root dir isn't git dir

* made git.show_on_dirs doc more concise

* git_statuses -> git_status for consistency

* explorer/common.lua -> explorer/node.lua

* fixed #1784 conflict

* don't order icons

* Revert "don't order icons"

This reverts commit 23f6276ef7.
2022-12-17 17:05:33 +11:00
Alexander Courtis
87409bb4af
fix(#1815): don't schedule find_file calls, debounce update_focused_file with 15ms default (#1828)
* Revert "Revert "fix(#1815): don't schedule find_file calls, debounce update_focused_file with 15ms default (#1820)""

This reverts commit a8d26bb088.

* fix(#1723): find_file for externally created new file results in folder unable to be opened

* fix(#1723): find_file for externally created new file results in folder unable to be opened
2022-12-16 15:35:09 +11:00
David Sierra DiazGranados
d85b6718ce
feat(picker): allow custom function actions.open_file.window_picker.picker (#1782)
* feat: allow passing a custom function as a window picker

WIP

* fix: move logic expression to if statement

If `M.window_picker.custom_function()` returns `nil` then `pick_win_id()`
will run (the or part). We don't want that. More verbose, but better.

* feat(open): add window_picker.picker

* feat(open): add window_picker.picker

* style nit

* feat(open): add window_picker.picker

* docs: add window_picker.picker documentation

* docs: add window_picker.picker documentation

Co-authored-by: Alexander Courtis <alex@courtis.org>
2022-12-16 15:14:33 +11:00
Alexander Courtis
cdb40dc42e neovim requirement 0.7.0 -> 0.8.0, remove WinSeparator/VertSplit compatibility shims 2022-12-16 13:45:16 +11:00
Ian Homer
949913f186
feat(api): rename_basename API and action (#1791)
* relative rename action

* 🔥 remove debug print statement

* 🐛 better handling of dot files

Also pickout extension in filename with more one dot

* 🔧 keymap e for relative-rename action

* 📝 update help with relative-rename mapping

*  add API for rename_relative

* 🚨 correct lint warnings

* rename_relative -> rename_root

* stylua

* ♻️ use fnamemodify instead of custom logic

* 💥 refactor renaming api using vim filename modifiers

Rename API now supports filename modifiers as arguments, although
only with limited support of options. The function signature however
will allow improvements going forward. The API signature is backward
compatible, although the behviour has changed as per the next comment.

This change changes the default behaviour of the renames, rename_full is
what rename was, rename now just renames the tail (i.e. the filename)

* 🐛 make api rename, without args, functional

*  allow modifier argument to be used in API call

* 📝 update documentation with new command name

* rename-file.fn takes only a modifier as argument

* add Api.fs.rename_basename, specify modifiers for rename, rename_sub

* add Api.fs.rename_node

* rename-file tidy allowed modifiers

* 🐛 fix bugs after last refactoring

rename ":t" and ":t:r" was moving file to root of project and not
maintaining sub-directory

* 🐛 correct absolute rename

which was loosing sub-directory on rename

* 🔥 remove debug print statements

* stylua

Co-authored-by: Alexander Courtis <alex@courtis.org>
2022-12-16 13:32:48 +11:00
Alexander Courtis
a8d26bb088 Revert "fix(#1815): don't schedule find_file calls, debounce update_focused_file with 15ms default (#1820)"
This reverts commit 623cecb809.
2022-12-16 13:15:32 +11:00
Alexander Courtis
623cecb809
fix(#1815): don't schedule find_file calls, debounce update_focused_file with 15ms default (#1820)
* fix(#1815): don't schedule find file calls

* fix(#1815): debounce BufEnter find_file

* fix(#1815): deprecate nvim-tree.find_file

* fix(#1815): debounce BufEnter find_file

* fix(#1815): debounce BufEnter find_file
2022-12-16 13:01:37 +11:00
Eric Haynes
7177d95ac0
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>
2022-12-11 14:40:38 +11:00
Alexander Courtis
b9aaf805a1 doc: format help 2022-12-11 12:12:19 +11:00
Alexander Courtis
3c5d9dd31f doc: consolidate and clarify :help examples 2022-12-10 16:25:02 +11:00
Alexander Courtis
c5dc80c36b
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
2022-12-10 15:55:33 +11:00
Richard Li
829e9f68e1
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
2022-11-29 11:12:34 +11:00
baahrens
0b319a1b28
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
2022-11-28 11:17:09 +11:00
Alexander Courtis
9f7bed5536 doc: specify that the terminal emulator must be configured to use the patched font 2022-11-28 10:26:37 +11:00
David Aguilera
99d713644d
feat(renderer): add renderer.root_folder_label (#1746)
* Add new renderer setting `add_root_updir` to fix #1743.

* Fix default value in docs.

* Remove proposed “add_root_updir” and rename “root_folder_modifier” to “root_folder_label”. Also, “root_folder_label” can be also a function now.

* chore: warn users about breaking change

* fix(#1743): use silent migration of root_folder_modifier

* fix(#1743): add example, document previous renderer.root_folder_modifier

* Add check to validate return type of “root_folder_label” is string.

* Change “root_folder_label” default value to “:~:s?$?/..?”.

* Add missing keyword “local” to local variable “label”.

Co-authored-by: David Aguilera <david.aguilera@neliosoftware.com>
Co-authored-by: gegoune <dev@clog.rocks>
Co-authored-by: Alexander Courtis <alex@courtis.org>
2022-11-26 14:02:05 +11:00
Ibrahim Abdelkareem
68a2a0971e
feat(diagnostics): add diagnostics.severity (#1755)
* feat: Support diagnostics severity

* fix: Revert Hunk

* feat: Supports min/max severity

* feat: Supports min/max severity: tidy doc

* feat: Supports min/max severity: tidy doc

* feat: Supports min/max severity: tidy doc

Co-authored-by: Alexander Courtis <alex@courtis.org>
2022-11-21 09:09:09 +11:00
Alexander Courtis
e38e061710 feat(api): add api.tree.get_nodes 2022-11-19 15:54:16 +11:00
Wessel Blokzijl
c49499413a
feat(tabs): add tab.sync options (#1698)
* Sync closing of nvim-tree across tabs

* chore: remove vim.* "requires"

* Sync closing of nvim-tree across tabs

* Fix api.close calls

* Fix issue from merge

* Implement changes

* Finish todos and add close_all_tabs

* silently refactor options, add doc

* fix vinegar example

* Refactor close to work with tabid

* Close nvim tree if last buffer

* close and abandon all tabs on subsequent setup calls

Co-authored-by: Alexander Courtis <alex@courtis.org>
2022-11-19 13:57:45 +11:00
Alexander Courtis
ed9db632a8
feat(watcher): add filesystem_watchers.ignore_dirs (#1705) 2022-11-05 10:24:25 +11:00
kylo252
6ca6f99e76
feat(notify): add notify.threshold (#1693)
* feat: configurable notification level

add `notify.threshold` to setup opts

* feat: configurable notification level: add threshold example doc

* feat: configurable notification level: log always comes last

Co-authored-by: Alexander Courtis <alex@courtis.org>
2022-11-01 10:24:40 +11:00
wyrid
cd2f7569db
feat(api): add api.marks.clear (#1708) 2022-11-01 08:46:56 +11:00
wyrid
cbb5313f90
feat(api): add api.fs.clear_clipboard (#1706)
* feat: command to clear the clipboard

* feat: command to clear the clipboard: stylua

* feat: command to clear the clipboard: add to :help

Co-authored-by: Alexander Courtis <alex@courtis.org>
2022-10-31 15:48:05 +11:00
Alexander Courtis
1044eba9e7 doc: update event subscription example 2022-10-31 13:59:03 +11:00
Alexander Courtis
cb98892dea doc: add hitest notes and add termguicolors to example setups 2022-10-29 12:45:24 +11:00
Alexander Courtis
1be1e17be5 doc(#1676): clarify view.mapping.list contents including case of key 2022-10-25 09:37:02 +11:00
Ofir Gal
23c0fe9a0a
Added NvimTreeLineNr higlight (#1684) 2022-10-24 19:53:13 +00:00
Alexander Courtis
58055a0397 doc(#1672): clarify mappings example and doc 2022-10-24 11:45:33 +11:00
Alexander Courtis
ea09ab497e doc(#731): add single mouse mapping notes 2022-10-23 10:25:18 +11:00
Alexander Courtis
3a2f68b9d5 fix(#1668): revert all startup behaviour changes back to 540055b 2022-10-18 11:14:35 +11:00
Alexander Courtis
4e24505e2b
fix(#1664): respect hijack_directories.enable on startup when not open_on_setup (#1665) 2022-10-17 14:49:57 +11:00
Alexander Courtis
6ff828b25b doc: vim.g.loaded -> vim.g.loaded_netrw 2022-10-15 10:50:07 +11:00
Alexander Courtis
c66cbdfc25
fix(#1629): nvim start with file named *NvimTree* opens tree instead of buffer (#1634)
* fix(#1629): nvim start with file named *NvimTree* opens tree instead of buffer

* Revert "fix(#1629): nvim start with file named *NvimTree* opens tree instead of buffer"

This reverts commit e7136078f7.

* fix(#1629): nvim start with file named *NvimTree* treats file as tree

* fix(#1629): nvim start with file named *NvimTree* treats file as tree
2022-10-11 10:00:03 +11:00
kiyan
b4d704e88d chore: replace urls from kyazdani42 -> nvim-tree 2022-10-08 11:31:57 +02:00
Alexander Courtis
4a01f90d11 feat(view): float.quit_on_focus_loss documentation clarification 2022-10-08 14:39:23 +11:00
emmanueltouzery
79f631bc1d
feat(view): add float.quit_on_focus_loss, float respects actions.open_file.quit_on_open (#1621) 2022-10-08 14:35:20 +11:00
Alexander Courtis
c5536db0b7
fix(#1270): open_on_setup_file does not override open_on_setup, hijack_directories does not override startup behaviour (#1618) 2022-10-08 14:25:38 +11:00
longguzzz
7282f7de8a
feat: add NvimTreeCursorLineNr (#1616) 2022-10-01 12:51:22 +02:00
Alexander Courtis
0417d9148b feat: focus_empty_on_setup 2022-09-22 15:15:03 +10:00
Alexander Courtis
540055be5f
chore: document :NvimTreeFindFile! and add bang :NvimTreeFindFileToggle! 2022-09-22 14:18:49 +10:00
Alexander Courtis
fbd421da71 chore: remove non-functional sides bottom/top 2022-09-22 13:53:09 +10:00
Alexander Courtis
ac8d259bad fix(prompt): add select_prompts to suit UI decorator plugins such as dressing and telescope 2022-09-22 13:23:49 +10:00
KuuWang
3676e0b124
feat(sorters): allow user sort_by
* feat: Mixin Sorter (#1565) Self Solved

adding `mixin` sort options for `rust` like package systems

```

package.rs
package/
  __inside__

lib.rs
lib/
  _inside_

a.rs
b.rs
module.rs

```

* feat: sort_by, after_sort options for more convinient using

```
*nvim-tree.sort_by*
Changes how files within the same directory are sorted.
Can be one of 'name', 'case_sensitive', 'modification_time' or 'extension',
'function'.
>
  sort_by = function(a, b)
    if not (a and b) then
      return true
    end
    if a.nodes and not b.nodes then
      return true
    elseif not a.nodes and b.nodes then
      return false
    end

    return a.name:lower() <= b.name:lower()
  end

  end
  Type: `string | function(a, b)`, Default: `"name"`

*nvim-tree.after_sort*
Related to nvim-tree.sort_by, this function runs without mergesort.
Can be defined by your own after-sort works.
  Type: `function(table)`, Default: `disable`

>
  after_sort = function(t)
    local i = 1

    while i <= #t do
      if t[i] and t[i].nodes then
        local j = i + 1
        while j <= #t do
          if t[j] and not t[j].nodes and t[i].name:lower() == t[j].name:lower():match "(.+)%..+$" then
            local change_target = t[j]
            table.remove(t, j)
            table.insert(t, i, change_target)
            break
          end
          j = j + 1
        end
      end
      i = i + 1
    end
  end

```

* remove: after_sort ( misunderstood feature )

sort_by parameter can be function.

``` lua
  sort_by = function(t)
    local sorters = require "nvim-tree.explorer.sorters"
    local comparator = sorters.retrieve_comparator("name")
    sorters.split_merge(t, 1, #t, comparator) -- run default merge_sort
    local i = 1

    while i <= #t do
      if t[i] and t[i].nodes then
        local j = i + 1
        while j <= #t do
          if t[j] and not t[j].nodes and t[i].name:lower() == t[j].name:lower():match "(.+)%..+$" then
            local change_target = t[j]
            table.remove(t, j)
            table.insert(t, i, change_target)
            break
          end
          j = j + 1
        end
      end
      i = i + 1
    end
  end,

```

* try-fix: change existing merge_sort function, call user's sort_by

hope.. like it...?

* doc: explain function parameter and return, add more complex example

* fix: reorder with user-comparator exceed memory limit

apply merge_sort
check nil & type for senitize

* fix: user_index based sorting ( create index )

for performance, create index once,
using index to re-ordering

* fix: fence problems

* doc & fix: merge_sort problem fix & nil sorting

add complex example

* fix: sort_by detect and use string and nil

* doc: revert sort_by to simple

* fix: sort_by does not return anything

Co-authored-by: Alexander Courtis <alex@courtis.org>
2022-09-18 16:00:49 +10:00
Alexander Courtis
fb8735e96c doc: eager netrw disabling 2022-09-11 11:41:12 +10:00
Mivort
e8bf3d778a
feat(renderer): add renderer.indent_width (#1505)
* feat: add config option for a tree indent width

add 'indent_width' option to configure visible indent for tree nesting
levels (default is 2).

* add 'bottom' char for a corner extension

* apply stylua formatting

* provide value constraints in documentation

* limit minimal indent width

* make marker symbols have one utf8 char width

* match stylua formatting

* add the commentary regarding utf-8 first symbol match
2022-08-30 09:44:30 +10:00
Alexander Courtis
c3ea264947
feat(view): allow function for view.float.open_win_config (#1538) 2022-08-23 17:14:23 +10:00
Hoang Nguyen
a73d0d4800
feat(file-popup): add actions.file_popup.open_win_config
* file-popup: add nvim_open_win configuration

* docs: update file-popup configuration
2022-08-08 10:52:14 +10:00
Krzysztof Cieśla
7323c81bd6
feat(view): Floating nvim tree window #1377 (#1462)
* Simple mock-up of floating nvim-tree window

* Passing whole table to nvim_open_win()

* Run update-help.sh

* Use vim.api alias

* Add comment to float options

* Added `anchor` to float options

* Enabling float window enforces `actions.open_file.quit_on_open`

* Added documentation

* add view.float.open_win_config, skipping validation

* Made nvim-tree window closes when float is enabled

* Close nvim-tree window when out of focus

* Update help

Co-authored-by: Krzysztof Cieśla <krzysztof.marcin.ciesla@cern.ch>
Co-authored-by: Alexander Courtis <alex@courtis.org>
2022-08-06 15:40:07 +10:00
Alexander Courtis
1685484738
doc: reinstate mapping doc, mark on_attach as experimental (#1481) 2022-08-02 13:59:51 +02:00
Austin Harris
7fcb48c852
feat: add option for folder arrows to be inline with indent markers (#1468) 2022-07-28 11:49:23 +02:00
Kian-Meng Ang
2928f8fe31
fix(docs): typos (#1470) 2022-07-27 13:48:14 +02:00
Kiyan
64cc3c17e1
feat(mapping): deprecate user mappings and add on_attach (#1424) 2022-07-26 11:09:39 +02:00
kiyan
5f30a7bee4 chore(config): enable filesystem watchers by default 2022-07-26 10:46:59 +02:00
kiyan
e5222970d9 chore(api): add missing functions 2022-07-25 15:02:55 +02:00
kiyan
e95bfbfc2d fix(api): use copy.node instead of copy.name
ref #1461
2022-07-25 14:35:01 +02:00
kiyan
a0448184af fix(api): copy is a table, copy -> copy.name
fixes #1461
2022-07-25 13:38:28 +02:00
Kiyan
e7832785d2
feat(api): add public API module (#1432) 2022-07-25 11:11:48 +02:00
Gutyina Gergő
522bde4ea5
fix(docs) Add commas in example config for docs (#1447) 2022-07-21 14:31:18 +02:00
kiyan
79434c2b3c feat(tab_change): introduce new option to filter buffer by bufname or ft
Also fixes changing tab by deferring the call on tab enter.
New option `ignore_buf_on_tab_change` to avoid opening for some tabs.
Some example could be neogit, vim fugitive, man pages ...
2022-07-21 11:14:40 +02:00
Alexander Courtis
ecca8118f8 doc: remove fs_poll interval and update doc 2022-07-19 09:39:03 +10:00
Alexander Courtis
06e48c29c4
chore(watchers): refactor events and make debouncer safe
- fs poll -> fs events
- make debouncer safe and fix diagnostics events
2022-07-17 08:50:24 +02:00
Kiyan
26512c369f
feat(marks): add bulk move action (#1419) 2022-07-17 08:25:11 +02:00
Kiyan
89becc7604
feat(marks): add navigation (next, previous, select) (#1415) 2022-07-16 10:40:47 +02:00
kiyan
9a02dedd92 fix(renderer): indent markers with arrows
breaking: glyphs for indent markers should only be one block large
2022-07-15 09:33:40 +02:00
kiyan
6a49a0301f refactor(marks): fix offset line and move into init.lua
also set node in marks record instead of true
2022-07-12 09:34:26 +02:00
Kiyan
df92f1527f
feat(bookmarks): add bookmark feature (#1412) 2022-07-11 10:00:12 +02:00
Alexander Courtis
fd562ede63
fix(#1406): allow nvim-tree.renderer.icons.show.folder_arrow
* fix(#1406): allow nvim-tree.renderer.icons.show.folder_arrow when not folder

* fix(#1406): allow nvim-tree.renderer.icons.show.folder_arrow when indent markers enabled

* fix(builder): highlight first iteration for arrow column

* fix stylua

Co-authored-by: kiyan <yazdani.kiyan@protonmail.com>
2022-07-10 12:14:18 +10:00
Alexander Courtis
08db5a576d doc: clarify need for patched font for nvim-web-devicons 2022-07-09 11:14:15 +10:00
kiyan
c84735483f feat: add on_tree_resize event 2022-07-06 13:35:29 +02:00
Toby O'Sullivan
38fabe86cb
Optionally suppress the symlink destination (#1396) 2022-07-05 10:05:21 +02:00
Alexander Courtis
736cc843e1
feat(#1389): add git.show_on_dirs (#1390) 2022-07-03 11:57:12 +02:00
Alexander Courtis
80d4f28383 feat(#1245): add next_diag_item and prev_diag_item actions 2022-07-03 16:04:49 +10:00
Krasimir Zahariev
21516f447b
feat(actions): expand_all 'exclude' option (#1388) 2022-07-02 18:17:39 +02:00
Alexander Courtis
c18aa389a3 doc: setup may be invoked multiple times 2022-06-28 11:27:14 +10:00
Alexander Courtis
e401a4c957 feat(watcher): debounce FS watchers 2022-06-28 11:18:22 +10:00
Alexander Courtis
0c13bd76a8
chore: update_root, sync_root_with_cwd, refactor with move_missing_val (#1359)
* chore: opts.update_focused_file.update_cwd -> update_root

* chore: opts.update_cwd -> sync_root_with_cwd

* chore: refactor options with utils move_missing_val

* chore: refactor options with utils move_missing_val

* chore: refactor options with utils move_missing_val

* chore: refactor options with utils move_missing_val

* chore: refactor options with utils move_missing_val

* chore: refactor options with utils move_missing_val
2022-06-26 12:18:14 +10:00
Alexander Courtis
0db63a350a doc: tidy help 2022-06-25 11:39:24 +10:00
Alexander Courtis
7160e68d5a doc: tidy help 2022-06-25 11:23:19 +10:00
Alexander Courtis
1fc0eee946
fix(#1354): add missing :hi NvimTreeFileIgnored (#1358) 2022-06-18 10:42:12 +02:00
lixvbnet
b08003f546
feat: add NvimTreeFindFile!, root_dirs and prefer_startup_root 2022-06-18 15:32:56 +10:00
Alexander Courtis
84c2bd77ff docs: remove duplicate help tag 2022-06-18 14:18:37 +10:00
gegoune
aba394896b
docs: lighten up readme and rework docs (#1327)
* docs: lighten up readme and rework docs

* docs: clean up mappings from readme + some other small changes

* docs: move sections around

* ci: remove readme parts of docs' autogen

* docs: discuss nvim-web-devicons and provide an example

* docs: add an example setup

* docs: fix opts scraping; try and make more macos compatible

* docs: add *nvim-tree* tag at start of help

* docs: add an example setup

* docs: update quick start to match readme

* docs: add basic commands

* docs: add g? hint

* docs: add :help links to readme

* docs: restore help wanted

* docs: add example screenshot

* docs: add features

* docs: add example screenshot

* docs: add features to help

* docs: clarify option functions

Co-authored-by: Alexander Courtis <alex@courtis.org>
2022-06-18 14:14:42 +10:00
kylo252
1caca62854
feat(view): ability to centralize view on entering (#1310) 2022-06-07 10:09:58 +10:00
lu5je0
821f050fda
feat: full-name of node in floating window (#1305) 2022-06-06 11:15:03 +02:00
Raafat Turki
3c936c7cb6
feat(trash): default command 'trash' -> 'gio trash' (#1323) 2022-06-06 11:13:37 +02:00
Rammiah
6f6eab14dc
feat(renderer): indent_markers add a item icon (#1321) 2022-06-05 14:19:19 +02:00
Kiyan
b0d27c09b6
feat(explorer): add filesystem watchers (#1304)
* feat(explorer): add experimental watchers

This commit introduces watchers to update the tree.
This behavior is introduced behind an "filesystem_watchers" option
which should prevent instabilities.
It will become the default at some point.

Co-authored-by: Alexander Courtis <alex@courtis.org>
2022-06-05 12:39:39 +02:00
Alexander Courtis
3aeb59b075 doc: setup call is only allowed once 2022-06-04 12:37:02 +10:00
Kiyan
2002b21be7
feat(resize): add ability to grow and shrink the tree when drawing (#1293)
Will adapt the view size based on the longest line.
fixes #865
2022-05-31 09:05:00 +02:00
Alexander Courtis
8198fa01fc
doc: default mappings 2022-05-30 12:53:28 +10:00
emmanueltouzery
3806653d75
new option: close windows displaying removed files (#1300) 2022-05-29 11:23:01 +02:00
Kiyan
3a95c5a9cf
feat(actions): expand all under folder (#1292) 2022-05-29 11:15:32 +02:00
Alexander Courtis
e482bad61c doc: tidy spacing and consistency 2022-05-28 15:45:41 +10:00
Alexander Courtis
3ba383d591
chore/remove globals (#1279)
* remove renderer globals: nvim_tree_add_trailing nvim_tree_highlight_opened_files nvim_tree_root_folder_modifier nvim_tree_special_files

* remove renderer globals: nvim_tree_icon_padding

* remove renderer globals: nvim_tree_symlink_arrow

* remove renderer globals: nvim_tree_show_icons, nvim_tree_show_icons

* remove renderer globals: nvim_tree_git_hl

* remove renderer globals: nvim_tree_group_empty

* remove renderer globals: respect_buf_cwd

* remove renderer globals: nvim_tree_create_in_closed_folder

* remove globals: consistency in legacy checks

* remove renderer globals: nvim_tree_special_files

* renderer.icons.symbols -> glyphs
2022-05-28 11:08:40 +10:00
Taxo Rubio
b2ba6dea71
feat: optional path argument for NvimTreeToggle and NvimTreeFindFileToggle (#1276) 2022-05-21 13:31:14 +02:00
kiyan
17d5bd64e8 chore(config): auto resize the tree by default when opening a file.
config.open_file.auto_resize is now true by default.
Breaking change for default configurations.
See https://github.com/kyazdani42/nvim-tree.lua/issues/1275#issuecomment-1133515999
2022-05-21 11:27:49 +02:00
Michael
9563a11ce0
feat: reload explorer on buf enter (#1265) 2022-05-17 10:04:08 +02:00
Kiyan
6343813a35
feat(live-filter): add ability to live filter out nodes in the tree (#1056) 2022-05-17 10:03:49 +02:00
muro3r
aefa66c04d
feat: extension sorter (#1181) (#1264) 2022-05-14 10:54:01 +02:00
Kiyan
f8312cd06f
feat(renderer): add ability to set git icons in signcolumn (#1242) 2022-05-14 09:54:27 +02:00
Kiyan
47732b6dbf
chore(doc): improve help by allowing accessing nested options (#1246) 2022-05-09 08:59:09 +02:00
Kiyan
a1600e57f2
feat(renderer): allow placing git icons after filename (#1203)
This feature allows placing git icons after the filename.
2022-05-07 14:05:51 +02:00
Alexander Courtis
d54fc28045
1221 handle deprecated vert split (#1225) 2022-05-07 11:20:58 +02:00
Alexander Courtis
483f1550d1
Revert "fix: replace vertsplit highlights (#1142) (#1219)" (#1223)
This reverts commit 86d573dad7.
2022-05-01 17:03:44 +10:00
siduck
86d573dad7
fix: replace vertsplit highlights (#1142) (#1219) 2022-04-30 17:47:29 +02:00
Vincent Law
fd2332a33f
feat: case sensitive sorter (#1198) 2022-04-28 10:43:58 +10:00
Kiyan
3ac443207f
#1166 validate config (#1195) 2022-04-26 21:11:24 +02:00
kiyan
09a47aed8d Revert "#1166 validate user's options (#1177)"
This reverts commit 5bbd3a0a91.
2022-04-24 14:41:48 +02:00
kiyan
2c46464226 chore: add more sensible defaults for icons
adds a symlink and default icon by default
fixes #1192
2022-04-24 11:29:03 +02:00
Alexander Courtis
5bbd3a0a91
#1166 validate user's options (#1177) 2022-04-24 11:17:05 +02:00
Alexander Courtis
bf467a7cf4
#1169 document event payloads (#1187) 2022-04-24 11:15:08 +02:00
Alexander Courtis
2c71ffcc0d
add actions.change_dir.restrict_above_cwd (#1171) 2022-04-23 10:45:23 +02:00
Alexander Courtis
cdbc210d92
#1172 add renderer.icons.webdev_colors default true (#1175) 2022-04-18 15:45:14 +02:00
Harry Prior
cff5a106b2
feat - add open and close tree events (#1151) 2022-04-18 15:41:21 +02:00
Alexander Courtis
ff6ef58b03
#1146 clarify filters.exclude and toggle actions (#1168) 2022-04-18 15:40:15 +02:00
Alexander Courtis
7629d4d106
#1091 diagnostics logging (#1170) 2022-04-18 15:39:51 +02:00
Alexander Courtis
84993e9e9f Remove unnecessary packer .config - it will clobber user options! See #1094 2022-04-16 11:27:29 +10:00
Alexander Courtis
d5e4f0655b
add view.indent_markers (#1134) 2022-04-10 15:40:29 +02:00
Lò [By The Way]
83fe370d52
Added actions.opts.use_sys_clipboard, [issue: 789 ] (#1141) 2022-04-10 15:39:36 +02:00
Matthew Steedman
924aa29092
feat: add hl_group for file icons (#1131) 2022-04-04 09:33:11 +02:00
Alexander Courtis
6368880968
add open_on_setup_file option (#1133) 2022-04-03 14:31:40 +02:00
Alexander Courtis
00fd8aefe0
feat: filters.custom can specify regex (#1112) 2022-04-02 13:03:57 +02:00
kiyan
524758a207 chore: remove auto close
also fix emmylua errors in log.lua file
fixes #1005
fixes #871
2022-03-27 12:13:24 +02:00
Alexander Courtis
ba121f0244
document performance issues and add to bug report template (#1111) 2022-03-27 11:52:51 +02:00
Alexander Courtis
591b64873f update doc g:nvim_tree_icons to match defaults 2022-03-27 15:19:31 +11:00
Alexander Courtis
54c78dbca2
#791 add profiling for some operations (#1108) 2022-03-26 13:22:28 +01:00
Alexander Courtis
20797a8d74
#1050 #1068 various default options tweaks (#1074) 2022-03-18 11:35:15 +01:00
Alexander Courtis
a50fd77c99
#857 add filter_custom action, filter_ignored->filter_git_ignored (#1077) 2022-03-18 11:30:30 +01:00
Alexander Courtis
b136c7b6f9
#1064 add copy_paste logging and more error copy-paste error handling (#1076) 2022-03-18 11:27:03 +01:00
Alexander Courtis
a65078e3ae
#1060 use one log file with the option to truncate (#1075) 2022-03-12 14:43:33 +01:00
Andreas Bissinger
60a9c86c53
feat: make it possible to collapse the tree but keep the directories open which are in used in buffers (#1057) 2022-03-09 11:08:29 +01:00
Alexander Courtis
19075f41e8
File logging (#1053)
* add file logging infrastructure

* log git runner operations

* log configuration and mappings

* document file logging infrastructure

* style fixes

* stylua fixes

* document log file locations
2022-03-07 08:44:37 +01:00
Andreas Bissinger
c25be06612
feat: close file info popup if on same node (#1054) 2022-03-06 13:07:12 +01:00
Andreas Bissinger
7cb689795e
feature: add feature to increase/decrease size (#1048) 2022-03-06 11:33:28 +01:00
Brandon D
690c7e96ed
feat: add sort_by option to sort files by modification time (#1040)
Co-authored-by: Brandon Dwiel <bdwiel@apple.com>
2022-03-03 23:41:58 +01:00
Andreas Bissinger
50a927f176
feat: add popup information (#1042) 2022-03-03 21:13:10 +01:00
Andreas Bissinger
4fedb93cec
feat: add new keybinding "b" to run a command in the focused node (#1024) 2022-03-03 09:05:03 +01:00
kiyan
0e7856fd8d BREAKING_CHANGE: nvim-tree buffer was renamed
You should now use `NvimTree_*` when matching with an autocmd
There is now 1 buffer per tabpage.
2022-03-01 20:58:04 +01:00
kiyan
6af2d5a720 chore: move auto_resize to actions.open_file.resize_window
fixes #1034
2022-03-01 20:07:36 +01:00
Andreas Bissinger
61a59ffae1
feat: new config to be able to always open the tree on setup (#1023) 2022-03-01 19:56:04 +01:00
Alexander Courtis
97717d8d23
G migration mechanism (#1030) 2022-03-01 19:54:12 +01:00
Alexander Courtis
3d8912ca53
add more sensible defaults for window_picker.excludes (#1027) 2022-02-28 21:33:24 +01:00
Alexander Courtis
7034d26921
doc: remove unused g: (#1028) 2022-02-28 21:32:11 +01:00
Andreas Bissinger
48e76bc031
feat: Add a new keybinding to search and expand a certain path (#1014) 2022-02-22 23:36:59 +01:00
Grzegorz Rozdzialik
0fcd6614b5
feat: allow not changing the cwd when changing directories (#1019) 2022-02-22 21:39:12 +01:00
Richard Mathieson
3486c48225
fix: add config for preserving window proportions on open file (#999) 2022-02-22 14:04:14 +01:00
kiyan
61b57e3676 doc: fix mappings setup for vinegar 2022-02-22 10:59:44 +01:00
kiyan
9bea1947fb chore: fix documentation on vinegar 2022-02-22 09:23:01 +01:00
kiyan
69867f4a00 chore: move window picker configuration in setup 2022-02-21 22:19:35 +01:00
kiyan
b59ff27087 fix: typo in doc 2022-02-21 21:45:02 +01:00
kiyan
f8f297acbf feat: add vinegar abilities to the tree
fixes #860
2022-02-21 21:42:43 +01:00
kiyan
a9fe57c0d8 chore: update docs to add H and formatting 2022-02-21 18:48:22 +01:00
Andreas Bissinger
9f3dc98de7
feat: Add a new keybinding "W" to collapse the whole tree (#1013) 2022-02-21 13:46:55 +01:00
ilkecan
95df001185
fix(doc): nvim_tree_create_in_closed_folder default value (#1015) 2022-02-20 23:19:14 +01:00
wongxy
41f51508e3
fix: use "" as flag to remove default mappings (#1011) 2022-02-20 11:29:09 +01:00
Alexander Courtis
a1937ca079
1007 do not wipe modified buffers when hijack unnamed buffer when opening (#1009) 2022-02-20 10:41:47 +01:00
Alexander Courtis
44ffcb6f4b
#998 allow users to unmap keys, remove user keys from default multi key maps (#1000) 2022-02-19 16:50:27 +01:00
kiyan
76d4ed5d77 feat: add ability to not hijack the unnamed buffer 2022-02-16 21:00:28 +01:00
kiyan
bf697d782d chore: leave netrw enabled by default but still hijack it 2022-02-16 20:43:41 +01:00
Kiyan
6da7467944
refacto: buffer management, setup fixes, autocmd fixes (#967) 2022-02-14 19:16:45 +01:00
kiyan
b54de4b48a doc(readme): update requirement from 0.5 to 0.6 2022-02-09 22:37:38 +01:00
Steve Vermeulen
4ec8c9f364
Added a new option auto_reload_on_write to allow users to disable it for performance reasons (#956) 2022-02-09 21:06:07 +01:00
kiyan
d1ff893b32 fix: disable update_to_buf_dir when netrw is not disabled
fixes #718
2022-02-07 09:19:44 +01:00
kiyan
1fe29f8eef chore: move g:nvim_tree_quit_on_open into open_file action config 2022-02-05 18:42:08 +01:00
kiyan
f74dd24c58 refacto: move some code into actions
(non breaking, old assignments link to new assignments)
- move lib.collapse-all into actions/collapse-all
- move lib.dir-up into actions/dir-up
- move lib.change-dir into actions/change-dir
- use setup option for change-dir global (and use the old option for
  setup)
2022-02-05 17:42:40 +01:00
kiyan
067525a1fa chore(doc): remove old unused hl groups
fixes #804
2022-02-05 16:51:50 +01:00
kiyan
724716ec2e fix(doc): remove tree_cb from edit_no_picker 2022-01-21 12:36:45 +01:00
Sander van Harmelen
14bdf134f9
Add a mode that allows edit without the picker (#873) 2022-01-21 12:36:28 +01:00
Sander van Harmelen
1ac3502290
Add a config option to use :cd instead of :lcd (#874)
Fixes #829
2022-01-21 12:29:30 +01:00
Carlos Coves Prieto
fa8bb09de4
custom node keymaps (#855) 2022-01-21 11:03:49 +01:00
Sávio Carlos Martins Costa
0982c6a35a
restore-feat: highlight-git-ignored-files (#847) 2022-01-21 10:59:38 +01:00
Michael
9e2f6b6f25
feat: add exclude filter list (#878) 2022-01-21 10:48:58 +01:00
hellojukay
a896a2b5a2
fix demo in doc (#884)
fix lua DSL syntax error
2022-01-21 10:47:22 +01:00
Eli W. Hunter
ef6577205c
Warn about dirbuf.nvim in update_to_buf_dir docs (#901) 2022-01-21 10:46:05 +01:00
kiyan
e49bd8ffd3 chore(doc, mappings): remove S-CR mapping because its invalid
Fixes #850
2021-12-24 12:57:19 +01:00
kiyan
839b4c61e0 fix(doc): add | to diagnostics.show_on_dirs 2021-12-24 12:47:49 +01:00
Reviakin Evgeny
239f2d6fea
show diagnostics on parent dirs if nodes with diagnostics are not visible (#862) 2021-12-24 12:47:23 +01:00
Xun
f408781a46
delete extra space (#842) 2021-12-12 20:52:03 +01:00
Xun
bc13a1ffca
allow signcolumn settings (#805) 2021-12-12 13:00:54 +01:00
Raafat Turki
e842f08884
feat: add trashing (#749) 2021-11-28 15:26:24 +01:00
JavierPoduje
9db956fab7
feat: allow number and relativenumber settings (#762) 2021-11-28 14:18:43 +01:00
Kiyan
6662b60a2b
feat/chore: rewrite git with job and some other fixes (#743)
* feat/chore: rewrite git with job and some other fixes

* fix: fs clear window, rename echo_warning -> warn

also fix renaming and add an event blocker to avoid running many events
at the same time
2021-11-27 16:02:54 +01:00
kiyan
a6c1d45dd6 chore: refacto populate filtering
move `nvim_tree_ignore` and `nvim_tree_hide_dotfiles` to setup
2021-10-30 12:25:09 +02:00
M.A
fd3969ec98
feat: add hide_root_folder (#728) 2021-10-24 16:48:57 +02:00
Jean-Luc Bastarache
cf3e242106
docs: move modeline to the end of the documentation (#729) 2021-10-23 15:36:56 +02:00
Jean-Luc Bastarache
a49b3ad4f5
docs: include NvimTreeWindowPicker in hl-groups (#730) 2021-10-23 15:36:33 +02:00
figsoda
514619897f
feat: add NvimTreeFindFileToggle (#735) 2021-10-23 15:35:28 +02:00
kiyan
94b8604e86 chore: complete the diagnostic setup migration
Colors groups and icons are now in diagnostics.lua. They are defined on
setup which allows an easier configuration and better documentation.
`lsp_diagnostics` boolean value has been moved into a table `diagnostics`
with `enable` and `icons` as properties.
2021-10-10 11:42:22 +02:00
kiyan
fb32f35d7f chore: allow configuring height
also fixes window management for top and bottom tree side
2021-10-03 14:13:10 +02:00
kiyan
137628acb6 chore: update_to_buf_dir allow auto_open configuration
also improve the documentation with doc references
2021-10-02 13:53:51 +02:00
kiyan
9282944078 fix: add option update_to_buf_dir in setup
avoid hijacking the tree for use case of users using vim-dirvish
2021-09-30 12:43:20 +02:00
Evgeni Chasnovski
2361c1ac3a
Remove duplicate 'nvim-tree-options' tag. (#642) 2021-09-26 17:42:54 +02:00
kiyan
3633e728e0 chore: refacto view setup and simplify the code 2021-09-26 14:55:49 +02:00
booperlv
2a5d529219
feat: option to set path destination to parent folder when cursor is on a closed folder while creating files (#628) 2021-09-26 12:10:19 +02:00
kiyan
1edebb7894 chore: lsp diagnostics setup 2021-09-26 11:56:44 +02:00
Kiyan
a864b80baf
chore: refacto setup part 1 (#603)
* chore: refacto setup part 1

refacto setup for code entrypoint
following options switched boolean values as options to the setup function:
- `nvim_tree_disable_netrw` -> `disable_netrw`
- `nvim_tree_hijack_netrw` -> `hijack_netrw`
- `nvim_tree_auto_open` -> `open_on_setup`
- `nvim_tree_auto_close` -> `auto_close`
- `nvim_tree_tab_open` -> `tab_open`
- `nvim-tree-update-cwd` -> `update_cwd`
- `nvim_tree_hijack_cursor` -> `hijack_cursor`
- `nvim_tree_system_open_command` -> `system_open.cmd`
- `nvim_tree_system_open_command_args` -> `system_open.args`
- `nvim_tree_follow` -> `update_focused_file.enable`
- `nvim_tree_follow_update_path` -> `update_focused_file.update_cwd`
Also added new option `update_focused_file.ignore_list` which will
ignore filepath or filetypes that matches one entry of the list when
updating the path if update_cwd is true.

* add deprecation warning

* update readme

* schedule on enter to avoid running before vim first buffer has loaded

* update docs

* correct typo

* rename tab open -> open on tab
2021-09-25 16:43:39 +02:00
kiyan
d41ca62320 fix: hide the base dir update on bufenter behind an option 2021-08-30 19:03:43 +02:00
xeluxee
d74af818c0
system_open: use asynchronous vim.loop to spawn process + let user customize the command to be used to open a file/folder with default system application (#551) 2021-08-14 15:13:56 +02:00