File tree Expand file tree Collapse file tree 6 files changed +9
-45
lines changed
Expand file tree Collapse file tree 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
2828
2929## Requirements
3030
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 )
3232
3333[ 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"
3434
Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ Git Integration
103103
104104Requirements
105105
106- This file explorer requires `neovim >= 0.8 .0`
106+ This file explorer requires `neovim >= 0.9 .0`
107107
108108==============================================================================
109109 2. QUICKSTART *nvim-tree-quickstart*
@@ -832,7 +832,6 @@ Use nvim-tree in a floating window.
832832
833833Highlight precedence, additive:
834834 git < opened < modified < bookmarked < diagnostics < copied < cut
835- Neovim <= 0.8 will only show the highest.
836835
837836*nvim-tree.renderer.add_trailing*
838837Appends 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"
1111local git = require " nvim-tree.git"
1212local filters = require " nvim-tree.explorer.filters"
1313local buffers = require " nvim-tree.buffers"
14- local events = require " nvim-tree.events"
1514local notify = require " nvim-tree.notify"
1615
1716local _config = {}
@@ -338,21 +337,6 @@ local function setup_autocommands(opts)
338337 end ,
339338 })
340339 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
356340end
357341
358342local DEFAULT_OPTS = { -- BEGIN_DEFAULT_OPTS
Original file line number Diff line number Diff line change @@ -183,15 +183,8 @@ function M.setup()
183183
184184 -- hard link override when legacy only is present
185185 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 })
195188 if vim .tbl_isempty (hl_from ) and not vim .tbl_isempty (hl_to ) then
196189 vim .api .nvim_command (" hi link " .. from .. " " .. to )
197190 end
Original file line number Diff line number Diff line change @@ -295,24 +295,16 @@ function Builder:add_highlights(node)
295295 table.insert (name_groups , name )
296296 end
297297
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
299299 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 )
305301 else
306302 icon_hl_group = icon_groups [1 ]
307303 end
308304
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
310306 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 )
316308 else
317309 name_hl_group = name_groups [1 ]
318310 end
Original file line number Diff line number Diff line change @@ -348,11 +348,7 @@ function M.resize(size)
348348 local new_size = get_width ()
349349 vim .api .nvim_win_set_width (M .get_winnr () or 0 , new_size )
350350
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 )
356352
357353 if not M .View .preserve_window_proportions then
358354 vim .cmd " :wincmd ="
You can’t perform that action at this time.
0 commit comments