fix(#3157): add view.cursorlineopt

This commit is contained in:
Alexander Courtis 2025-06-20 13:45:13 +10:00
parent 0a06f65bf0
commit 680d715664
3 changed files with 8 additions and 1 deletions

View File

@ -398,6 +398,7 @@ Following is the default configuration. See |nvim-tree-opts| for details. >lua
view = {
centralize_selection = false,
cursorline = true,
cursorlineopt = "both",
debounce_delay = 15,
side = "left",
preserve_window_proportions = false,
@ -771,6 +772,10 @@ initially centralized, see |zz|.
Enable |cursorline| in the tree window.
Type: `boolean`, Default: `true`
*nvim-tree.view.cursorlineopt*
Set |cursorlineopt| in the tree window.
Type: `string`, Default: `"both"`
*nvim-tree.view.debounce_delay*
Idle milliseconds before some reload / refresh operations.
Increase if you experience performance issues around screen refresh.
@ -3258,6 +3263,7 @@ highlight group is not, hard linking as follows: >
|nvim-tree.update_focused_file.update_root.ignore_list|
|nvim-tree.view.centralize_selection|
|nvim-tree.view.cursorline|
|nvim-tree.view.cursorlineopt|
|nvim-tree.view.debounce_delay|
|nvim-tree.view.float|
|nvim-tree.view.float.enable|

View File

@ -245,6 +245,7 @@ local DEFAULT_OPTS = { -- BEGIN_DEFAULT_OPTS
view = {
centralize_selection = false,
cursorline = true,
cursorlineopt = "both",
debounce_delay = 15,
side = "left",
preserve_window_proportions = false,

View File

@ -69,7 +69,7 @@ function View:new(args)
foldcolumn = "0",
cursorcolumn = false,
cursorline = self.explorer.opts.view.cursorline,
cursorlineopt = "both",
cursorlineopt = self.explorer.opts.view.cursorlineopt,
colorcolumn = "0",
wrap = false,
winhl = appearance.WIN_HL,