Commit f39f7b6
fix(nvim-tree#2415): nvim 0.8 highlight overhaul support, limited to only show highest highlight precedence (nvim-tree#2642)
* 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(nvim-tree#2415): nvim 0.8 highlight overhaul support, limited to only show highest highlight precedence
---------
Co-authored-by: Jaime Terreu <[email protected]>
Co-authored-by: Alexander Courtis <[email protected]>1 parent e9ac136 commit f39f7b6
File tree
3 files changed
+22
-6
lines changed- doc
- lua/nvim-tree
- renderer
3 files changed
+22
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
793 | 793 | | |
794 | 794 | | |
795 | 795 | | |
| 796 | + | |
796 | 797 | | |
797 | 798 | | |
798 | 799 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
179 | | - | |
180 | | - | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
181 | 188 | | |
182 | 189 | | |
183 | 190 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
295 | 295 | | |
296 | 296 | | |
297 | 297 | | |
298 | | - | |
| 298 | + | |
299 | 299 | | |
300 | | - | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
301 | 305 | | |
302 | 306 | | |
303 | 307 | | |
304 | 308 | | |
305 | | - | |
| 309 | + | |
306 | 310 | | |
307 | | - | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
308 | 316 | | |
309 | 317 | | |
310 | 318 | | |
| |||
0 commit comments