Skip to content

Commit e95d3a5

Browse files
committed
highlight_modified, signcolumn modified_placement
Refactored to make everything use HighlightedString to remove all the complex `insert_highlight` calculation. Not tested.
1 parent b4ef5e0 commit e95d3a5

File tree

9 files changed

+246
-180
lines changed

9 files changed

+246
-180
lines changed

doc/nvim-tree-lua.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@ Subsequent calls to setup will replace the previous configuration.
247247
folder = true,
248248
folder_arrow = true,
249249
git = true,
250+
modified = true,
250251
},
251252
glyphs = {
252253
default = "",
@@ -649,6 +650,10 @@ Indicate which file have unsaved modification.
649650
succession (e.g. lsp rename).
650651
Type: `number`, Default: `50` (ms)
651652

653+
You will still need to set |renderer.icons.show.modified| `= true` or
654+
|renderer.highlight_modified| `= true` to be able to see things in the
655+
tree.
656+
652657
*nvim-tree.filesystem_watchers*
653658
Will use file system watcher (libuv fs_event) to watch the filesystem for
654659
changes.
@@ -893,6 +898,11 @@ UI rendering setup
893898
Requires |git.enable| `= true`
894899
Type: `boolean`, Default: `true`
895900

901+
*nvim-tree.renderer.icons.show.modified*
902+
Show a modified icon, see |renderer.icons.modified_placement|
903+
Requires |modified.enable| `= true`
904+
Type: `boolean`, Default: `true`
905+
896906
*nvim-tree.renderer.icons.glyphs*
897907
Configuration options for icon glyphs.
898908

@@ -1515,6 +1525,7 @@ NvimTreeEmptyFolderName (Directory)
15151525
NvimTreeOpenedFolderName (Directory)
15161526
NvimTreeExecFile
15171527
NvimTreeOpenedFile
1528+
NvimTreeModifiedFile
15181529
NvimTreeSpecialFile
15191530
NvimTreeImageFile
15201531
NvimTreeIndentMarker

lua/nvim-tree.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,7 @@ local DEFAULT_OPTS = { -- BEGIN_DEFAULT_OPTS
568568
folder = true,
569569
folder_arrow = true,
570570
git = true,
571+
modified = true,
571572
},
572573
glyphs = {
573574
default = "",

lua/nvim-tree/colors.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ local function get_hl_groups()
4040
SpecialFile = { gui = "bold,underline", fg = colors.yellow },
4141
ImageFile = { gui = "bold", fg = colors.purple },
4242
OpenedFile = { gui = "bold", fg = colors.green },
43+
ModifiedFile = { fg = colors.green },
4344

4445
GitDirty = { fg = colors.dark_red },
4546
GitDeleted = { fg = colors.dark_red },

0 commit comments

Comments
 (0)