From 02e8f077a9723c43969d3a0f3cc16e8d1011f148 Mon Sep 17 00:00:00 2001 From: Alexander Courtis Date: Mon, 2 May 2022 12:45:27 +1000 Subject: [PATCH 1/2] #1221 handle deprecated VertSplit --- lua/nvim-tree/colors.lua | 1 + lua/nvim-tree/view.lua | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/nvim-tree/colors.lua b/lua/nvim-tree/colors.lua index 91986ddb729..9d361952cc2 100644 --- a/lua/nvim-tree/colors.lua +++ b/lua/nvim-tree/colors.lua @@ -65,6 +65,7 @@ local function get_links() EndOfBuffer = "EndOfBuffer", CursorLine = "CursorLine", VertSplit = "VertSplit", + WinSeparator = "NvimTreeVertSplit", CursorColumn = "CursorColumn", FileDirty = "NvimTreeGitDirty", FileNew = "NvimTreeGitNew", diff --git a/lua/nvim-tree/view.lua b/lua/nvim-tree/view.lua index b8ed3d47eb5..1cd426d4b15 100644 --- a/lua/nvim-tree/view.lua +++ b/lua/nvim-tree/view.lua @@ -27,7 +27,8 @@ M.View = { "EndOfBuffer:NvimTreeEndOfBuffer", "Normal:NvimTreeNormal", "CursorLine:NvimTreeCursorLine", - "VertSplit:NvimTreeVertSplit", + -- #1221 WinSeparator not present in nvim 0.6.1 and some builds of 0.7.0 + pcall(vim.cmd, "silent hi WinSeparator") and "WinSeparator:NvimTreeWinSeparator" or "VertSplit:NvimTreeWinSeparator", "StatusLine:NvimTreeStatusLine", "StatusLineNC:NvimTreeStatuslineNC", "SignColumn:NvimTreeSignColumn", From 056fb8ee8b1f88de9aecd4817508d870e0a63b18 Mon Sep 17 00:00:00 2001 From: Alexander Courtis Date: Mon, 2 May 2022 12:47:48 +1000 Subject: [PATCH 2/2] #1221 handle deprecated VertSplit --- doc/nvim-tree-lua.txt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/doc/nvim-tree-lua.txt b/doc/nvim-tree-lua.txt index 491b97d1809..4a52bbdb5fb 100644 --- a/doc/nvim-tree-lua.txt +++ b/doc/nvim-tree-lua.txt @@ -872,11 +872,12 @@ NvimTreeWindowPicker There are also links to normal bindings to style the tree itself. -Normal -EndOfBuffer -CursorLine -VertSplit -CursorColumn +NvimTreeNormal +NvimTreeEndOfBuffer +NvimTreeCursorLine +NvimTreeVertSplit (deprecated, use NvimTreeWinSeparator) +NvimTreeWinSeparator +NvimTreeCursorColumn There are also links for file highlight with git properties These all link to there Git equivalent