Skip to content

Commit 6e9b5f3

Browse files
authored
Merge branch 'master' into master
2 parents 7108587 + b8b44b6 commit 6e9b5f3

53 files changed

Lines changed: 1097 additions & 615 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ end_of_line = lf
77
[nvim-tree-lua.txt]
88
max_line_length = 78
99

10+
# keep these in sync with .luarc.json
11+
# .editorconfig is used within nvim, overriding .luarc.json
12+
# .luarc.json is used by style check
1013
[*.lua]
1114
indent_style = space
1215
max_line_length = 140

.github/workflows/ci.yml

Lines changed: 24 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -20,45 +20,25 @@ jobs:
2020
strategy:
2121
matrix:
2222
lua_version: [ 5.1 ]
23+
luacheck_version: [ 1.2.0 ]
2324

2425
steps:
25-
- uses: actions/checkout@v4
26+
- name: checkout
27+
uses: actions/checkout@v6
2628

27-
- uses: leafo/gh-actions-lua@v10
29+
- name: install lua ${{ matrix.lua_version }}
30+
uses: leafo/gh-actions-lua@v12
2831
with:
2932
luaVersion: ${{ matrix.lua_version }}
3033

31-
- uses: leafo/gh-actions-luarocks@v4
34+
- name: install luarocks
35+
uses: leafo/gh-actions-luarocks@v6
3236

33-
- run: luarocks install luacheck 1.1.1
37+
- name: install luacheck ${{ matrix.luacheck_version }}
38+
run: luarocks install luacheck ${{ matrix.luacheck_version }}
3439

3540
- run: make lint
3641

37-
style:
38-
runs-on: ubuntu-latest
39-
40-
concurrency:
41-
group: ${{ github.workflow }}-${{ matrix.emmy_lua_code_style_version }}-${{ github.head_ref || github.ref_name }}
42-
cancel-in-progress: true
43-
44-
strategy:
45-
matrix:
46-
emmy_lua_code_style_version: [ 1.5.6 ]
47-
48-
steps:
49-
- uses: actions/checkout@v4
50-
51-
- name: install emmy_lua_code_style
52-
run: |
53-
mkdir -p CodeFormat
54-
curl -L "https://github.com/CppCXY/EmmyLuaCodeStyle/releases/download/${{ matrix.emmy_lua_code_style_version }}/linux-x64.tar.gz" | tar zx --directory CodeFormat
55-
56-
- run: echo "CodeFormat/linux-x64/bin" >> "$GITHUB_PATH"
57-
58-
- run: make style
59-
60-
- run: make style-doc
61-
6242
check:
6343
runs-on: ubuntu-latest
6444

@@ -69,26 +49,31 @@ jobs:
6949
strategy:
7050
matrix:
7151
nvim_version: [ stable, nightly ]
72-
luals_version: [ 3.11.0 ]
52+
luals_version: [ 3.15.0 ]
53+
54+
env:
55+
VIMRUNTIME: /home/runner/nvim-${{ matrix.nvim_version }}/share/nvim/runtime
7356

7457
steps:
75-
- uses: actions/checkout@v4
58+
- name: checkout
59+
uses: actions/checkout@v6
7660

77-
- uses: rhysd/action-setup-vim@v1
61+
- name: install nvim ${{ matrix.nvim_version }}
62+
uses: rhysd/action-setup-vim@v1
7863
with:
7964
neovim: true
8065
version: ${{ matrix.nvim_version }}
8166

82-
- name: install luals
67+
- name: install lua-language-server ${{ matrix.luals_version }}
8368
run: |
8469
mkdir -p luals
8570
curl -L "https://github.com/LuaLS/lua-language-server/releases/download/${{ matrix.luals_version }}/lua-language-server-${{ matrix.luals_version }}-linux-x64.tar.gz" | tar zx --directory luals
71+
echo "luals/bin" >> "$GITHUB_PATH"
8672
87-
- run: echo "luals/bin" >> "$GITHUB_PATH"
88-
89-
- name: make check
90-
env:
91-
VIMRUNTIME: /home/runner/nvim-${{ matrix.nvim_version }}/share/nvim/runtime
92-
run: make check
73+
- run: make check
9374

9475
- run: make help-check
76+
77+
- run: make style
78+
79+
- run: make style-doc

.github/workflows/luarocks-release.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
name: Luarocks Release
2+
23
on:
34
push:
45
tags:
5-
- 'v[0-9]+.[0-9]+.[0-9]+'
6+
- v*
67
workflow_dispatch:
8+
79
jobs:
810
luarocks-upload:
911
runs-on: ubuntu-latest
1012
steps:
11-
- uses: actions/checkout@v4
13+
- uses: actions/checkout@v6
1214
- name: LuaRocks Upload
1315
uses: nvim-neorocks/luarocks-tag-release@v7
1416
env:

.github/workflows/release-please.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
steps:
1717
- uses: google-github-actions/release-please-action@v4
1818
id: release
19-
- uses: actions/checkout@v4
19+
- uses: actions/checkout@v6
2020
- name: tag major and minor versions
2121
if: ${{ steps.release.outputs.release_created }}
2222
run: |

.github/workflows/semantic-pr-subject.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ jobs:
1414
semantic-pr-subject:
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: amannn/action-semantic-pull-request@v5.5.3
17+
- uses: amannn/action-semantic-pull-request@v6.1.1
1818
env:
1919
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.hooks/pre-commit.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
#!/bin/sh
1+
#!/usr/bin/env sh
22

33
make

.luarc.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,24 @@
11
{
22
"$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json",
3-
"runtime.version.luals-check-only": "Lua 5.1",
3+
"runtime.version": "Lua 5.1",
44
"workspace": {
55
"library": [
66
"$VIMRUNTIME/lua/vim",
77
"${3rd}/luv/library"
88
]
99
},
10+
"format": {
11+
"defaultConfig": {
12+
"indent_style": "space",
13+
"max_line_length": "140",
14+
"indent_size": "2",
15+
"continuation_indent": "2",
16+
"quote_style": "double",
17+
"call_arg_parentheses": "always",
18+
"space_before_closure_open_parenthesis": "false",
19+
"align_continuous_similar_call_args": "true"
20+
}
21+
},
1022
"diagnostics": {
1123
"libraryFiles": "Disable",
1224
"globals": [],

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "1.10.0"
2+
".": "1.14.0"
33
}

CHANGELOG.md

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,91 @@
11
# Changelog
22

3+
## [1.14.0](https://github.com/nvim-tree/nvim-tree.lua/compare/nvim-tree-v1.13.0...nvim-tree-v1.14.0) (2025-08-12)
4+
5+
6+
### Features
7+
8+
* **#2685:** highlight git new tracked with NvimTreeGitFileNewHL ([#3176](https://github.com/nvim-tree/nvim-tree.lua/issues/3176)) ([0a52012](https://github.com/nvim-tree/nvim-tree.lua/commit/0a52012d611f3c1492b8d2aba363fabf734de91d))
9+
* **#2789:** add optional function expand_until to api.tree.expand_all and api.node.expand ([#3166](https://github.com/nvim-tree/nvim-tree.lua/issues/3166)) ([1b876db](https://github.com/nvim-tree/nvim-tree.lua/commit/1b876db04903b93c78c97fd3f3dd85d59eeef5ff))
10+
* **#2826:** allow only one window with nvim-tree buffer per tab ([#3174](https://github.com/nvim-tree/nvim-tree.lua/issues/3174)) ([dd2364d](https://github.com/nvim-tree/nvim-tree.lua/commit/dd2364d6802f7f57a98acb8b545ed484c6697626))
11+
* **#3157:** add view.cursorlineopt ([#3158](https://github.com/nvim-tree/nvim-tree.lua/issues/3158)) ([8eb5e0b](https://github.com/nvim-tree/nvim-tree.lua/commit/8eb5e0bfd1c4da6efc03ab0c1ccf463dbaae831e))
12+
13+
14+
### Bug Fixes
15+
16+
* **#3077:** deleting a directory containing symlinked directory will delete the contents of the linked directory ([#3168](https://github.com/nvim-tree/nvim-tree.lua/issues/3168)) ([10db694](https://github.com/nvim-tree/nvim-tree.lua/commit/10db6943cb40625941a35235eeb385ffdfbf827a))
17+
* **#3157:** add view.cursorlineopt ([8eb5e0b](https://github.com/nvim-tree/nvim-tree.lua/commit/8eb5e0bfd1c4da6efc03ab0c1ccf463dbaae831e))
18+
* **#3172:** live filter exception ([#3173](https://github.com/nvim-tree/nvim-tree.lua/issues/3173)) ([0a7fcdf](https://github.com/nvim-tree/nvim-tree.lua/commit/0a7fcdf3f8ba208f4260988a198c77ec11748339))
19+
* invalid window id for popup info window ([#3147](https://github.com/nvim-tree/nvim-tree.lua/issues/3147)) ([d54a187](https://github.com/nvim-tree/nvim-tree.lua/commit/d54a1875a91e1a705795ea26074795210b92ce7f))
20+
* **picker:** exclude full_name window id from the choice ([#3165](https://github.com/nvim-tree/nvim-tree.lua/issues/3165)) ([543ed3c](https://github.com/nvim-tree/nvim-tree.lua/commit/543ed3cac212dc3993ef9f042f6c0812e34ddd43))
21+
* window picker ignore hidden window ([#3145](https://github.com/nvim-tree/nvim-tree.lua/issues/3145)) ([d87b41c](https://github.com/nvim-tree/nvim-tree.lua/commit/d87b41ca537e2131622d48a6c25ccf2fbe0e5d62))
22+
23+
24+
### Performance Improvements
25+
26+
* **#3171:** cache toplevel for untracked ([#3185](https://github.com/nvim-tree/nvim-tree.lua/issues/3185)) ([4425136](https://github.com/nvim-tree/nvim-tree.lua/commit/442513648c6936e754c3308a1c58591a399493e5))
27+
* **#3171:** use vim.system() instead of vim.fn.system() to execute git toplevel ([#3175](https://github.com/nvim-tree/nvim-tree.lua/issues/3175)) ([9a05b9e](https://github.com/nvim-tree/nvim-tree.lua/commit/9a05b9e9f928856ca23dbf876fab372003180c3f))
28+
29+
30+
### Reverts
31+
32+
* **#3180, #3177:** invalid group or tabpage ([#3181](https://github.com/nvim-tree/nvim-tree.lua/issues/3181)) ([9b289ab](https://github.com/nvim-tree/nvim-tree.lua/commit/9b289abd6998e30fd24cbc9919e0b0cbed6364ce))
33+
* **#3180, #3177:** resolve live filter failures ([#3183](https://github.com/nvim-tree/nvim-tree.lua/issues/3183)) ([a4699c0](https://github.com/nvim-tree/nvim-tree.lua/commit/a4699c0904103e7767334f6da05f5c2ea5514845))
34+
35+
## [1.13.0](https://github.com/nvim-tree/nvim-tree.lua/compare/nvim-tree-v1.12.0...nvim-tree-v1.13.0) (2025-06-14)
36+
37+
38+
### Features
39+
40+
* **#3113:** add renderer.icons.folder_arrow_padding ([#3114](https://github.com/nvim-tree/nvim-tree.lua/issues/3114)) ([ea5097a](https://github.com/nvim-tree/nvim-tree.lua/commit/ea5097a1e2702b4827cb7380e7fa0bd6da87699c))
41+
* **#3132:** add api.node.expand and api.node.collapse ([#3133](https://github.com/nvim-tree/nvim-tree.lua/issues/3133)) ([ae59561](https://github.com/nvim-tree/nvim-tree.lua/commit/ae595611fb2225f2041996c042aa4e4b8663b41e))
42+
43+
44+
### Bug Fixes
45+
46+
* "Invalid buffer id" on closing nvim-tree window ([#3129](https://github.com/nvim-tree/nvim-tree.lua/issues/3129)) ([25d16aa](https://github.com/nvim-tree/nvim-tree.lua/commit/25d16aab7d29ca940a9feb92e6bb734697417009))
47+
* **#2746:** background and right aligned icons in floating windows ([#3128](https://github.com/nvim-tree/nvim-tree.lua/issues/3128)) ([cbc3165](https://github.com/nvim-tree/nvim-tree.lua/commit/cbc3165e08893bb499da035c6f6f9d1512b57664))
48+
* **#3117:** allow changing filename's casing ([bd54d1d](https://github.com/nvim-tree/nvim-tree.lua/commit/bd54d1d33c20d8630703b9842480291588dbad07))
49+
* **#3117:** windows: change file/dir case ([#3135](https://github.com/nvim-tree/nvim-tree.lua/issues/3135)) ([bd54d1d](https://github.com/nvim-tree/nvim-tree.lua/commit/bd54d1d33c20d8630703b9842480291588dbad07))
50+
* **#3122:** remove redundant vim.validate ([#3123](https://github.com/nvim-tree/nvim-tree.lua/issues/3123)) ([e7d1b7d](https://github.com/nvim-tree/nvim-tree.lua/commit/e7d1b7dadc62fe2eccc17d814354b0a5688621ce))
51+
* **#3124:** fix icon padding for "right_align" placements, notably for dotfiles ([#3125](https://github.com/nvim-tree/nvim-tree.lua/issues/3125)) ([e4cd856](https://github.com/nvim-tree/nvim-tree.lua/commit/e4cd856ebf4fec51db10c69d63e43224b701cbce))
52+
* **#3124:** prevent empty icons_right_align response from breaking padding ([e4cd856](https://github.com/nvim-tree/nvim-tree.lua/commit/e4cd856ebf4fec51db10c69d63e43224b701cbce))
53+
* **#3134:** setting one glyph to "" no longer disables others ([#3136](https://github.com/nvim-tree/nvim-tree.lua/issues/3136)) ([ebcaccd](https://github.com/nvim-tree/nvim-tree.lua/commit/ebcaccda1c575fa19a8087445276e6671e2b9b37))
54+
* **#3143:** actions.open_file.window_picker.exclude applies when not using window picker ([#3144](https://github.com/nvim-tree/nvim-tree.lua/issues/3144)) ([05d8172](https://github.com/nvim-tree/nvim-tree.lua/commit/05d8172ebf9cdb2d140cf25b75625374fbc3df7f))
55+
* fixes [#3134](https://github.com/nvim-tree/nvim-tree.lua/issues/3134) ([ebcaccd](https://github.com/nvim-tree/nvim-tree.lua/commit/ebcaccda1c575fa19a8087445276e6671e2b9b37))
56+
* invalid buffer issue ([25d16aa](https://github.com/nvim-tree/nvim-tree.lua/commit/25d16aab7d29ca940a9feb92e6bb734697417009))
57+
58+
## [1.12.0](https://github.com/nvim-tree/nvim-tree.lua/compare/nvim-tree-v1.11.0...nvim-tree-v1.12.0) (2025-04-20)
59+
60+
61+
### Features
62+
63+
* add TreePreOpen event ([#3105](https://github.com/nvim-tree/nvim-tree.lua/issues/3105)) ([c24c047](https://github.com/nvim-tree/nvim-tree.lua/commit/c24c0470d9de277fbebecd718f33561ed7c90298))
64+
65+
66+
### Bug Fixes
67+
68+
* **#3101:** when renderer.highlight_opened_files = "none" do not reload on BufUnload and BufReadPost ([#3102](https://github.com/nvim-tree/nvim-tree.lua/issues/3102)) ([5bea2b3](https://github.com/nvim-tree/nvim-tree.lua/commit/5bea2b37523a31288e0fcab42f3be5c1bd4516bb))
69+
* explicitly set `border` to `"none"` in full name float ([#3094](https://github.com/nvim-tree/nvim-tree.lua/issues/3094)) ([c3c1935](https://github.com/nvim-tree/nvim-tree.lua/commit/c3c193594213c5e2f89ec5d7729cad805f76b256))
70+
* reliably dispatch exactly one TreeOpen and TreeClose events ([#3107](https://github.com/nvim-tree/nvim-tree.lua/issues/3107)) ([3a63717](https://github.com/nvim-tree/nvim-tree.lua/commit/3a63717d3d332d8f39aaf65be7a0e4c2265af021))
71+
72+
## [1.11.0](https://github.com/nvim-tree/nvim-tree.lua/compare/nvim-tree-v1.10.0...nvim-tree-v1.11.0) (2025-02-22)
73+
74+
75+
### Features
76+
77+
* **#1984:** add quit_on_open and focus opts to various api.node.open functions ([#3054](https://github.com/nvim-tree/nvim-tree.lua/issues/3054)) ([3281f33](https://github.com/nvim-tree/nvim-tree.lua/commit/3281f331f7f0bef13eb00fb2d5a9d28b2f6155a2))
78+
* **#3037:** add API node.buffer.delete, node.buffer.wipe ([#3040](https://github.com/nvim-tree/nvim-tree.lua/issues/3040)) ([fee1da8](https://github.com/nvim-tree/nvim-tree.lua/commit/fee1da88972f5972a8296813f6c00d7598325ebd))
79+
80+
81+
### Bug Fixes
82+
83+
* **#3045:** wipe scratch buffers for full name and show info popups ([#3050](https://github.com/nvim-tree/nvim-tree.lua/issues/3050)) ([fca0b67](https://github.com/nvim-tree/nvim-tree.lua/commit/fca0b67c0b5a31727fb33addc4d9c100736a2894))
84+
* **#3059:** test for presence of new 0.11 API vim.hl.range ([#3060](https://github.com/nvim-tree/nvim-tree.lua/issues/3060)) ([70825f2](https://github.com/nvim-tree/nvim-tree.lua/commit/70825f23db61ecd900c4cfea169bffe931926a9d))
85+
* arithmetic on nil value error on first git project open ([#3064](https://github.com/nvim-tree/nvim-tree.lua/issues/3064)) ([8052310](https://github.com/nvim-tree/nvim-tree.lua/commit/80523101f0ae48b7f1990e907b685a3d79776c01))
86+
* stl and stlnc fillchars are hidden in window picker ([b699143](https://github.com/nvim-tree/nvim-tree.lua/commit/b69914325a945ee5157f0d21047210b42af5776e))
87+
* window picker: hide fillchars: stl and stlnc ([#3066](https://github.com/nvim-tree/nvim-tree.lua/issues/3066)) ([b699143](https://github.com/nvim-tree/nvim-tree.lua/commit/b69914325a945ee5157f0d21047210b42af5776e))
88+
389
## [1.10.0](https://github.com/nvim-tree/nvim-tree.lua/compare/nvim-tree-v1.9.0...nvim-tree-v1.10.0) (2025-01-13)
490

591

CONTRIBUTING.md

Lines changed: 52 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,30 @@ Thank you for contributing.
44

55
See [wiki: Development](https://github.com/nvim-tree/nvim-tree.lua/wiki/Development) for environment setup, tips and tools.
66

7+
<!--
8+
https://github.com/jonschlinkert/markdown-toc
9+
markdown-toc --maxdepth=2 -i CONTRIBUTING.md
10+
-->
11+
12+
<!-- toc -->
13+
14+
- [Tools](#tools)
15+
- [Quality](#quality)
16+
* [lint](#lint)
17+
* [style](#style)
18+
* [check](#check)
19+
- [Diagnostics](#diagnostics)
20+
- [Backwards Compatibility](#backwards-compatibility)
21+
- [Adding New Actions](#adding-new-actions)
22+
- [Documentation](#documentation)
23+
* [Opts](#opts)
24+
* [API](#api)
25+
- [Windows](#windows)
26+
- [Pull Request](#pull-request)
27+
* [Subject](#subject)
28+
29+
<!-- tocstop -->
30+
731
# Tools
832

933
Following are used during CI and strongly recommended during local development.
@@ -12,9 +36,9 @@ Language server: [luals](https://luals.github.io)
1236

1337
Lint: [luacheck](https://github.com/lunarmodules/luacheck/)
1438

15-
Style: [EmmyLuaCodeStyle](https://github.com/CppCXY/EmmyLuaCodeStyle): `CodeCheck`
39+
Style Fixing: [EmmyLuaCodeStyle](https://github.com/CppCXY/EmmyLuaCodeStyle): `CodeCheck`
1640

17-
nvim-tree.lua migrated from stylua to EmmyLuaCodeStyle ~2024/10. `vim.lsp.buf.format()` may be used as it is the default formatter for luals
41+
nvim-tree.lua migrated from stylua to EmmyLuaCodeStyle ~2024/10. `vim.lsp.buf.format()` may be used as it is the default formatter for luals, using an embedded [EmmyLuaCodeStyle](https://github.com/CppCXY/EmmyLuaCodeStyle)
1842

1943
You can install them via you OS package manager e.g. `pacman`, `brew` or other via other package managers such as `cargo` or `luarocks`
2044

@@ -36,14 +60,14 @@ make lint
3660

3761
## style
3862

39-
1. Runs CodeCheck using `.editorconfig` settings
63+
1. Runs lua language server `codestyle-check` only, using `.luarc.json` settings
4064
1. Runs `scripts/doc-comments.sh` to validate annotated documentation
4165

4266
```sh
4367
make style
4468
```
4569

46-
You can automatically fix `CodeCheck` issues via:
70+
You can automatically fix style issues using `CodeCheck`:
4771

4872
```sh
4973
make style-fix
@@ -72,6 +96,30 @@ curl -L "https://github.com/LuaLS/lua-language-server/releases/download/3.9.1/lu
7296
PATH="luals/bin:${PATH}" make check
7397
```
7498

99+
# Diagnostics
100+
101+
Diagnostics issues may not be suppressed. See [luals](https://luals.github.io) documentation for details on how to structure the code and comments.
102+
103+
Suppressions are permitted only in the following cases:
104+
105+
- Backwards compatibility shims
106+
- neovim API metadata incorrect, awaiting upstream fix
107+
- classic class framework
108+
109+
# Backwards Compatibility
110+
111+
Whenever new neovim API is introduced, please ensure that it is available in older versions. See `:help deprecated.txt` and `$VIMRUNTIME/lua/vim/_meta/api.lua`
112+
113+
See `nvim-tree.setup` for the oldest supported version of neovim. If the API is not availble in that version, a backwards compatibility shim must be used e.g.
114+
115+
```lua
116+
if vim.fn.has("nvim-0.10") == 1 then
117+
modified = vim.api.nvim_get_option_value("modified", { buf = target_bufid })
118+
else
119+
modified = vim.api.nvim_buf_get_option(target_bufid, "modified") ---@diagnostic disable-line: deprecated
120+
end
121+
```
122+
75123
# Adding New Actions
76124

77125
To add a new action, add a file in `actions/name-of-the-action.lua`. You should export a `setup` function if some configuration is needed.

0 commit comments

Comments
 (0)