File tree 6 files changed +9
-45
lines changed
6 files changed +9
-45
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ Questions and general support: [Discussions](https://github.com/nvim-tree/nvim-t
28
28
29
29
## Requirements
30
30
31
- [ neovim >=0.8 .0] ( https://github.com/neovim/neovim/wiki/Installing-Neovim )
31
+ [ neovim >=0.9 .0] ( https://github.com/neovim/neovim/wiki/Installing-Neovim )
32
32
33
33
[ nvim-web-devicons] ( https://github.com/nvim-tree/nvim-web-devicons ) is optional and used to display file icons. It requires a [ patched font] ( https://www.nerdfonts.com/ ) . Your terminal emulator must be configured to use that font, usually "Hack Nerd Font"
34
34
Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ Git Integration
103
103
104
104
Requirements
105
105
106
- This file explorer requires `neovim >= 0.8 .0`
106
+ This file explorer requires `neovim >= 0.9 .0`
107
107
108
108
==============================================================================
109
109
2. QUICKSTART *nvim-tree-quickstart*
@@ -832,7 +832,6 @@ Use nvim-tree in a floating window.
832
832
833
833
Highlight precedence, additive:
834
834
git < opened < modified < bookmarked < diagnostics < copied < cut
835
- Neovim <= 0.8 will only show the highest.
836
835
837
836
*nvim-tree.renderer.add_trailing*
838
837
Appends a trailing slash to folder names.
Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ local core = require "nvim-tree.core"
11
11
local git = require " nvim-tree.git"
12
12
local filters = require " nvim-tree.explorer.filters"
13
13
local buffers = require " nvim-tree.buffers"
14
- local events = require " nvim-tree.events"
15
14
local notify = require " nvim-tree.notify"
16
15
17
16
local _config = {}
@@ -338,21 +337,6 @@ local function setup_autocommands(opts)
338
337
end ,
339
338
})
340
339
end
341
-
342
- -- TODO #1545 remove similar check from view.resize
343
- if vim .fn .has " nvim-0.9" == 1 then
344
- create_nvim_tree_autocmd (" WinResized" , {
345
- callback = function ()
346
- if vim .v .event and vim .v .event .windows then
347
- for _ , winid in ipairs (vim .v .event .windows ) do
348
- if vim .api .nvim_win_is_valid (winid ) and utils .is_nvim_tree_buf (vim .api .nvim_win_get_buf (winid )) then
349
- events ._dispatch_on_tree_resize (vim .api .nvim_win_get_width (winid ))
350
- end
351
- end
352
- end
353
- end ,
354
- })
355
- end
356
340
end
357
341
358
342
local DEFAULT_OPTS = { -- BEGIN_DEFAULT_OPTS
Original file line number Diff line number Diff line change @@ -183,15 +183,8 @@ function M.setup()
183
183
184
184
-- hard link override when legacy only is present
185
185
for from , to in pairs (M .LEGACY_LINKS ) do
186
- local hl_from
187
- local hl_to
188
- if vim .fn .has " nvim-0.9" == 1 then
189
- hl_from = vim .api .nvim_get_hl (0 , { name = from })
190
- hl_to = vim .api .nvim_get_hl (0 , { name = to })
191
- else
192
- hl_from = vim .api .nvim__get_hl_defs (0 )[from ] or {}
193
- hl_to = vim .api .nvim__get_hl_defs (0 )[to ] or {}
194
- end
186
+ local hl_from = vim .api .nvim_get_hl (0 , { name = from })
187
+ local hl_to = vim .api .nvim_get_hl (0 , { name = to })
195
188
if vim .tbl_isempty (hl_from ) and not vim .tbl_isempty (hl_to ) then
196
189
vim .api .nvim_command (" hi link " .. from .. " " .. to )
197
190
end
Original file line number Diff line number Diff line change @@ -295,24 +295,16 @@ function Builder:add_highlights(node)
295
295
table.insert (name_groups , name )
296
296
end
297
297
298
- -- one or many icon groups; <= 0.8 always uses highest due to lack of a practical nvim_get_hl equivalent
298
+ -- one or many icon groups
299
299
if # icon_groups > 1 then
300
- if vim .fn .has " nvim-0.9" == 1 then
301
- icon_hl_group = self :create_combined_group (icon_groups )
302
- else
303
- icon_hl_group = icon_groups [# icon_groups ]
304
- end
300
+ icon_hl_group = self :create_combined_group (icon_groups )
305
301
else
306
302
icon_hl_group = icon_groups [1 ]
307
303
end
308
304
309
- -- one or many name groups; <= 0.8 always uses highest due to lack of a practical nvim_get_hl equivalent
305
+ -- one or many name groups
310
306
if # name_groups > 1 then
311
- if vim .fn .has " nvim-0.9" == 1 then
312
- name_hl_group = self :create_combined_group (name_groups )
313
- else
314
- name_hl_group = name_groups [# name_groups ]
315
- end
307
+ name_hl_group = self :create_combined_group (name_groups )
316
308
else
317
309
name_hl_group = name_groups [1 ]
318
310
end
Original file line number Diff line number Diff line change @@ -348,11 +348,7 @@ function M.resize(size)
348
348
local new_size = get_width ()
349
349
vim .api .nvim_win_set_width (M .get_winnr () or 0 , new_size )
350
350
351
- -- TODO #1545 remove similar check from setup_autocommands
352
- -- We let nvim handle sending resize events after 0.9
353
- if vim .fn .has " nvim-0.9" == 0 then
354
- events ._dispatch_on_tree_resize (new_size )
355
- end
351
+ events ._dispatch_on_tree_resize (new_size )
356
352
357
353
if not M .View .preserve_window_proportions then
358
354
vim .cmd " :wincmd ="
You can’t perform that action at this time.
0 commit comments