neovim requirement 0.7.0 -> 0.8.0, remove WinSeparator/VertSplit compatibility shims
This commit is contained in:
parent
949913f186
commit
cdb40dc42e
@ -28,7 +28,7 @@ Take a look at the [wiki](https://github.com/nvim-tree/nvim-tree.lua/wiki) for S
|
||||
|
||||
## Requirements
|
||||
|
||||
[neovim >=0.7.0](https://github.com/neovim/neovim/wiki/Installing-Neovim)
|
||||
[neovim >=0.8.0](https://github.com/neovim/neovim/wiki/Installing-Neovim)
|
||||
|
||||
[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"
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@ Git Integration
|
||||
|
||||
Requirements
|
||||
|
||||
This file explorer requires `neovim >= 0.7.0`
|
||||
This file explorer requires `neovim >= 0.8.0`
|
||||
|
||||
==============================================================================
|
||||
2. QUICK START *nvim-tree-quickstart*
|
||||
@ -1474,8 +1474,7 @@ NvimTreeEndOfBuffer (NonText)
|
||||
NvimTreeCursorLine (CursorLine)
|
||||
NvimTreeCursorLineNr (CursorLineNr)
|
||||
NvimTreeLineNr (LineNr)
|
||||
NvimTreeVertSplit (VertSplit) [deprecated, use NvimTreeWinSeparator]
|
||||
NvimTreeWinSeparator (VertSplit)
|
||||
NvimTreeWinSeparator (WinSeparator)
|
||||
NvimTreeCursorColumn (CursorColumn)
|
||||
|
||||
There are also links for file highlight with git properties, linked to their
|
||||
|
||||
@ -745,8 +745,8 @@ local function validate_options(conf)
|
||||
end
|
||||
|
||||
function M.setup(conf)
|
||||
if vim.fn.has "nvim-0.7" == 0 then
|
||||
vim.notify_once("nvim-tree.lua requires Neovim 0.7 or higher", vim.log.levels.WARN)
|
||||
if vim.fn.has "nvim-0.8" == 0 then
|
||||
vim.notify_once("nvim-tree.lua requires Neovim 0.8 or higher", vim.log.levels.WARN)
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
@ -69,8 +69,7 @@ local function get_links()
|
||||
CursorLineNr = "CursorLineNr",
|
||||
LineNr = "LineNr",
|
||||
CursorLine = "CursorLine",
|
||||
VertSplit = "VertSplit",
|
||||
WinSeparator = "NvimTreeVertSplit",
|
||||
WinSeparator = "WinSeparator",
|
||||
CursorColumn = "CursorColumn",
|
||||
FileDirty = "NvimTreeGitDirty",
|
||||
FileNew = "NvimTreeGitNew",
|
||||
|
||||
@ -4,12 +4,6 @@ local events = require "nvim-tree.events"
|
||||
local utils = require "nvim-tree.utils"
|
||||
local log = require "nvim-tree.log"
|
||||
|
||||
local function get_win_sep_hl()
|
||||
-- #1221 WinSeparator not present in nvim 0.6.1 and some builds of 0.7.0
|
||||
local has_win_sep = pcall(vim.cmd, "silent hi WinSeparator")
|
||||
return has_win_sep and "WinSeparator:NvimTreeWinSeparator" or "VertSplit:NvimTreeWinSeparator"
|
||||
end
|
||||
|
||||
M.View = {
|
||||
adaptive_size = false,
|
||||
centralize_selection = false,
|
||||
@ -38,7 +32,7 @@ M.View = {
|
||||
"CursorLine:NvimTreeCursorLine",
|
||||
"CursorLineNr:NvimTreeCursorLineNr",
|
||||
"LineNr:NvimTreeLineNr",
|
||||
get_win_sep_hl(),
|
||||
"WinSeparator:NvimTreeWinSeparator",
|
||||
"StatusLine:NvimTreeStatusLine",
|
||||
"StatusLineNC:NvimTreeStatuslineNC",
|
||||
"SignColumn:NvimTreeSignColumn",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user