@@ -46,7 +46,8 @@ CONTENTS *nvim-tree*
46
46
7. Mappings | nvim-tree-mappings |
47
47
7.1 Mappings: Default | nvim-tree-mappings-default |
48
48
8. Highlight | nvim-tree-highlight |
49
- 8.1 Highlight Overhaul | nvim-tree-highlight-overhaul |
49
+ 8.1 Highlight Default | nvim-tree-highlight-default |
50
+ 8.2 Highlight Overhaul | nvim-tree-highlight-overhaul |
50
51
9. Events | nvim-tree-events |
51
52
10. Prompts | nvim-tree-prompts |
52
53
11. OS Specific Restrictions | nvim-tree-os-specific |
@@ -846,7 +847,7 @@ Value can be `"none"`, `"icon"`, `"name"` or `"all"`.
846
847
847
848
*nvim-tree.renderer.highlight_opened_files*
848
849
Highlight icons and/or names for | bufloaded() | files using the
849
- `NvimTreeOpenedFile ` highlight group.
850
+ `NvimTreeOpenedHL ` highlight group.
850
851
See | nvim-tree-api.navigate.opened.next() | and | nvim-tree-api.navigate.opened.prev() |
851
852
Value can be `" none" ` , `" icon" ` , `" name" ` or `" all" ` .
852
853
Type: `string ` , Default: `" none" `
@@ -2240,12 +2241,29 @@ groups.
2240
2241
Example | :highlight | >
2241
2242
:hi NvimTreeSymlink guifg=blue gui=bold,underline
2242
2243
<
2243
- It is recommended to enable 'termguicolors' for the more pleasant 24-bit colours.
2244
+ It is recommended to enable 'termguicolors' for the more pleasant 24-bit
2245
+ colours.
2244
2246
2245
2247
To view the active highlight groups run `:so $VIMRUNTIME/syntax/hitest.vim`
2246
2248
as per | :highlight |
2247
2249
2248
- Default linked group or definition follows name.
2250
+ The `* HL` groups are additive as per | nvim-tree-opts-renderer | precedence.
2251
+ Only present attributes will clobber each other.
2252
+ In this example a modified, opened file will have magenta text, with cyan
2253
+ undercurl: >
2254
+ :hi NvimTreeOpenedHL guifg=magenta guisp=red gui=underline
2255
+ :hi NvimTreeModifiedFileHL guisp=cyan gui=undercurl
2256
+ <
2257
+ To prevent usage of a highlight:
2258
+ - Before setup: link the group to `Normal ` e.g.
2259
+ `:hi NvimTreeExecFile Normal`
2260
+ - After setup: link it to `NONE ` , to override the default link e.g.
2261
+ `:hi! link NvimTreeExecFile NONE`
2262
+
2263
+ ==============================================================================
2264
+ 8.1 HIGHLIGHT DEFAULT *nvim-tree-highlight-default*
2265
+
2266
+ | :highlight-link | `default` or | :highlight-default | define the groups on setup:
2249
2267
2250
2268
Standard: >
2251
2269
NvimTreeNormal Normal
@@ -2266,14 +2284,13 @@ Standard: >
2266
2284
NvimTreeStatusLineNC StatusLineNC
2267
2285
<
2268
2286
File Text: >
2269
- NvimTreeExecFile Constant
2270
- NvimTreeImageFile PreProc
2271
- NvimTreeOpenedFile Constant
2272
- NvimTreeSpecialFile PreProc
2273
- NvimTreeSymlink Statement
2287
+ NvimTreeExecFile SpellCap
2288
+ NvimTreeImageFile SpellCap
2289
+ NvimTreeSpecialFile SpellCap
2290
+ NvimTreeSymlink SpellCap
2274
2291
<
2275
2292
Folder Text: >
2276
- NvimTreeRootFolder PreProc
2293
+ NvimTreeRootFolder Title
2277
2294
NvimTreeFolderName Directory
2278
2295
NvimTreeEmptyFolderName Directory
2279
2296
NvimTreeOpenedFolderName Directory
@@ -2282,7 +2299,6 @@ Folder Text: >
2282
2299
File Icons: >
2283
2300
NvimTreeFileIcon NvimTreeNormal
2284
2301
NvimTreeSymlinkIcon NvimTreeNormal
2285
- NvimTreeOpenedFileIcon NvimTreeOpenedFile
2286
2302
<
2287
2303
Folder Icons: >
2288
2304
NvimTreeFolderIcon guifg=#8094b4 ctermfg=Blue
@@ -2306,16 +2322,16 @@ Clipboard: >
2306
2322
NvimTreeCutHL SpellBad
2307
2323
<
2308
2324
Bookmarks: >
2309
- NvimTreeBookmarkIcon Constant
2325
+ NvimTreeBookmarkIcon NvimTreeFolderIcon
2310
2326
NvimTreeBookmarkHL SpellLocal
2311
2327
<
2312
2328
Modified: >
2313
- NvimTreeModifiedIcon Constant
2329
+ NvimTreeModifiedIcon Type
2314
2330
NvimTreeModifiedFileHL NvimTreeModifiedIcon
2315
2331
NvimTreeModifiedFolderHL NvimTreeModifiedIcon
2316
2332
<
2317
2333
Opened: >
2318
- NvimTreeOpenedHL Constant
2334
+ NvimTreeOpenedHL Special
2319
2335
<
2320
2336
Git Icon: >
2321
2337
NvimTreeGitDeletedIcon Statement
@@ -2377,6 +2393,17 @@ Diagnostics Folder Highlight: >
2377
2393
- `highlight_xxx` is additive instead of overwriting. See
2378
2394
| nvim-tree-opts-renderer | for precedence.
2379
2395
2396
+ 2024-01-29: disambiguate default highlights sharing groups:
2397
+
2398
+ - NvimTreeRootFolder PreProc -> Title
2399
+ - NvimTreeModified* Constant -> Type
2400
+ - NvimTreeOpenedHL Constant -> Special
2401
+ - NvimTreeBookmarkIcon Constant -> NvimTreeFolderIcon
2402
+ - NvimTreeExecFile Constant -> SpellCap
2403
+ - NvimTreeImageFile PreProc -> SpellCap
2404
+ - NvimTreeSpecialFile PreProc -> SpellCap
2405
+ - NvimTreeSymlink Statement -> SpellCap
2406
+
2380
2407
Legacy highlight group are still obeyed when they are defined and the current
2381
2408
highlight group is not, hard linking as follows: >
2382
2409
0 commit comments