Commit Graph

1067 Commits

Author SHA1 Message Date
Alexander Courtis
875d38e52c doc: add alex-courtis screenshot with source 2022-10-09 14:54:55 +11:00
Alexander Courtis
0db4977303 doc: update hero screenshots with default options 2022-10-09 14:18:00 +11:00
Alexander Courtis
54afa503a9 chore: replace urls from kyazdani42 -> nvim-tree 2022-10-09 12:52:54 +11:00
kiyan
3d58a9b2cf fix(fs): create file failure when reloading watch path for node
because node can be a file or a symlink.
fixes #1633
2022-10-08 16:11:34 +02: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
be2b4f58e6
fix(#1615): focus created file when command line prompt requires confirmation (#1622)
* fix(#1615): focus created file when command line prompt requires confirmation

* fix(#1615): focus created file when command line prompt requires confirmation
2022-10-08 14:26:31 +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
rapan931
45d386a359
fix: remove unnecessary conditions (#1614) 2022-09-30 13:37:31 +02:00
kiyan
43fd138544 fix(ci): stylua action version number 2022-09-29 14:04:30 +02:00
kiyan
4aef454cd2 fix(styling): empty line 2022-09-29 13:59:05 +02:00
rapan931
11b524899f
fix: restore eventignore (#1612) 2022-09-29 13:55:24 +02:00
Xyhlon
9914780cba
fix(#1547): pass explicit system arguments to for git toplevel and untracked actions
* the nice fix

* fix(#1547): pass git toplevel cwd unescaped, pass git untracked arguments as per toplevel

Co-authored-by: Maximilian Philipp <philipp@student.tugraz.at>
Co-authored-by: Alexander Courtis <alex@courtis.org>
2022-09-25 12:58:05 +10:00
Alexander Courtis
52b0c32152
chore: add help screenshot, update example 2022-09-23 11:16:21 +10: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
Alexander Courtis
5cb87c037d
fix(#1553): set correct side on vim open directory (#1594) 2022-09-22 09:06:23 +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
Alexander Courtis
3e49d9b748 doc: direct users to ask questions instead of raising issues 2022-09-05 14:22:38 +10:00
Alexander Courtis
9ba5366115 doc: direct users to ask questions instead of raising issues 2022-09-05 14:21:03 +10:00
Alexander Courtis
b83e06f7fe Revert "doc: direct users to ask questions instead of raising issues"
This reverts commit 904110f8a9.
2022-09-05 14:15:54 +10:00
Alexander Courtis
904110f8a9 doc: direct users to ask questions instead of raising issues 2022-09-05 14:15:03 +10:00
Alexander Courtis
e282420111
fix(#1564): reset &bufhidden when opening an existing (maybe previewed) buffer (#1573) 2022-09-05 10:10:58 +10:00
ADoyle
951e10a64e
fix(#1568): show relative path of symlink destination (#1569) 2022-09-04 12:23:56 +10:00
Krzysztof Cieśla
d753a1da9a
fix(view): file filter and info popup above floating view
Co-authored-by: Krzysztof Cieśla <krzysztof.marcin.ciesla@cern.ch>
2022-09-03 14:29:18 +10:00
Alexander Courtis
011a7816b8 doc: add PR tips to contributing 2022-08-30 16:42:55 +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
Bryan Baron
757951ba6b
feat(view): floating window's optional adaptive size specification (#1559) 2022-08-30 08:50:18 +10:00
Krzysztof Cieśla
07f59e7450
fix(#1539): Fix closing nvim-tree float when file is removed (#1546)
* Fix closing nvim-tree float when file is removed

* Revert changes for non-float

Co-authored-by: Krzysztof Cieśla <krzysztof.marcin.ciesla@cern.ch>
2022-08-30 08:47:13 +10:00
Piotr Doan
4a725c0ca5
fix(#1555): incorrect exe highlight in Windows filesystem from WSL (#1557) 2022-08-29 10:53:23 +10:00
Krzysztof Cieśla
ce5d0a6b7d
fix(#1543): Do not resize nvim-tree window if float is enabled (#1556)
Co-authored-by: Krzysztof Cieśla <krzysztof.marcin.ciesla@cern.ch>
2022-08-27 13:36:26 +10:00
Alexander Courtis
c272c88daf fix(#1551): handle git status TT as staged 2022-08-27 11:58:16 +10:00
Alexander Courtis
c3ea264947
feat(view): allow function for view.float.open_win_config (#1538) 2022-08-23 17:14:23 +10:00
Alexander Courtis
259efeee62 fix(#1540): watcher ignore directories with name exactly '.git' 2022-08-23 10:29:45 +10:00
Alexander Courtis
e3353c4cb4
fix(#1529): ensure tree window exists before closing (#1537) 2022-08-22 16:58:41 +10:00
Alexander Courtis
2bb15fd98f doc: add PR tips to contributing 2022-08-22 16:22:32 +10:00
Sebastian Volland
90dcf42bba
fix(#1533): make toggle_mark ignore non-togglable nodes. (#1534) 2022-08-22 14:24:25 +10:00
Sebastian Volland
049cdd3073
fix(#1518): sort_by=modification_time not reordering on refresh. (#1519) 2022-08-22 14:19:06 +10:00
Sebastian Volland
c5fba1ec18
fix(#1520): file type changes are not detected. (#1521) 2022-08-22 11:41:11 +10:00
Alexander Courtis
81eb718394 fix: inverted diagnostic navigation keymaps 2022-08-20 14:40:09 +10:00
Jonathan Gollnick
9fd7b7ae29
fix(#1514): inverted git navigation keymaps (#1515) 2022-08-20 14:37:51 +10:00
Alexander Courtis
d9edddb849
fix(#1503): focus last win before close (#1509) 2022-08-20 14:32:28 +10:00
axlauri
09a51266bc
fix(#1494): git showUntracked value and log (#1504)
* should_show_untracked correctly evaluates status.showUntrackedFiles

* git.Runner:_run_git_job removes nils before logging args
2022-08-15 14:30:22 +10:00
Carlos Castillo
b314b3a699
fix(#1500): focusing directories with a trailing slash in their path doesn't work (#1501) 2022-08-14 15:00:04 +10:00
Alexander Courtis
261a5c380c
fix(#1480): break symlink cycle on find-file, search-node (#1482)
* fix(#1480): break symlink cycle on find-file

* fix(#1480): break symlink cycle on search-node

* fix(#1480): break symlink cycle on search-node

* fix(#1480): break symlink cycle on find-file
2022-08-08 12:46:09 +10:00