From 7282f7de8aedf861fe0162a559fc2b214383c51c Mon Sep 17 00:00:00 2001 From: longguzzz <96779663+longguzzz@users.noreply.github.com> Date: Sat, 1 Oct 2022 18:51:22 +0800 Subject: [PATCH] feat: add NvimTreeCursorLineNr (#1616) --- doc/nvim-tree-lua.txt | 1 + lua/nvim-tree/colors.lua | 1 + lua/nvim-tree/view.lua | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/nvim-tree-lua.txt b/doc/nvim-tree-lua.txt index 5d8382a3..fd02fd23 100644 --- a/doc/nvim-tree-lua.txt +++ b/doc/nvim-tree-lua.txt @@ -1351,6 +1351,7 @@ There are also links to normal bindings to style the tree itself. NvimTreeNormal NvimTreeEndOfBuffer (NonText) NvimTreeCursorLine (CursorLine) +NvimTreeCursorLineNr (CursorLineNr) NvimTreeVertSplit (VertSplit) [deprecated, use NvimTreeWinSeparator] NvimTreeWinSeparator (VertSplit) NvimTreeCursorColumn (CursorColumn) diff --git a/lua/nvim-tree/colors.lua b/lua/nvim-tree/colors.lua index 908aa9c3..22250a8f 100644 --- a/lua/nvim-tree/colors.lua +++ b/lua/nvim-tree/colors.lua @@ -66,6 +66,7 @@ local function get_links() Normal = "Normal", NormalNC = "NvimTreeNormal", EndOfBuffer = "EndOfBuffer", + CursorLineNr = "CursorLineNr", CursorLine = "CursorLine", VertSplit = "VertSplit", WinSeparator = "NvimTreeVertSplit", diff --git a/lua/nvim-tree/view.lua b/lua/nvim-tree/view.lua index 5b4ed966..1d0d7841 100644 --- a/lua/nvim-tree/view.lua +++ b/lua/nvim-tree/view.lua @@ -28,13 +28,14 @@ M.View = { foldmethod = "manual", foldcolumn = "0", cursorcolumn = false, - cursorlineopt = "line", + cursorlineopt = "both", colorcolumn = "0", wrap = false, winhl = table.concat({ "EndOfBuffer:NvimTreeEndOfBuffer", "Normal:NvimTreeNormal", "CursorLine:NvimTreeCursorLine", + "CursorLineNr:NvimTreeCursorLineNr", get_win_sep_hl(), "StatusLine:NvimTreeStatusLine", "StatusLineNC:NvimTreeStatuslineNC",