Skip to content

Commit 8eb5e0b

Browse files
authored
feat(nvim-tree#3157): add view.cursorlineopt (nvim-tree#3158)
fix(nvim-tree#3157): add view.cursorlineopt
1 parent 0a06f65 commit 8eb5e0b

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

doc/nvim-tree-lua.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,7 @@ Following is the default configuration. See |nvim-tree-opts| for details. >lua
398398
view = {
399399
centralize_selection = false,
400400
cursorline = true,
401+
cursorlineopt = "both",
401402
debounce_delay = 15,
402403
side = "left",
403404
preserve_window_proportions = false,
@@ -771,6 +772,10 @@ initially centralized, see |zz|.
771772
Enable |cursorline| in the tree window.
772773
Type: `boolean`, Default: `true`
773774

775+
*nvim-tree.view.cursorlineopt*
776+
Set |cursorlineopt| in the tree window.
777+
Type: `string`, Default: `"both"`
778+
774779
*nvim-tree.view.debounce_delay*
775780
Idle milliseconds before some reload / refresh operations.
776781
Increase if you experience performance issues around screen refresh.
@@ -3258,6 +3263,7 @@ highlight group is not, hard linking as follows: >
32583263
|nvim-tree.update_focused_file.update_root.ignore_list|
32593264
|nvim-tree.view.centralize_selection|
32603265
|nvim-tree.view.cursorline|
3266+
|nvim-tree.view.cursorlineopt|
32613267
|nvim-tree.view.debounce_delay|
32623268
|nvim-tree.view.float|
32633269
|nvim-tree.view.float.enable|

lua/nvim-tree.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ local DEFAULT_OPTS = { -- BEGIN_DEFAULT_OPTS
245245
view = {
246246
centralize_selection = false,
247247
cursorline = true,
248+
cursorlineopt = "both",
248249
debounce_delay = 15,
249250
side = "left",
250251
preserve_window_proportions = false,

lua/nvim-tree/explorer/view.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ function View:new(args)
6969
foldcolumn = "0",
7070
cursorcolumn = false,
7171
cursorline = self.explorer.opts.view.cursorline,
72-
cursorlineopt = "both",
72+
cursorlineopt = self.explorer.opts.view.cursorlineopt,
7373
colorcolumn = "0",
7474
wrap = false,
7575
winhl = appearance.WIN_HL,

0 commit comments

Comments
 (0)