neovim requirement 0.7.0 -> 0.8.0, remove WinSeparator/VertSplit compatibility shims
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user