@@ -46,7 +46,8 @@ CONTENTS *nvim-tree*
4646 7. Mappings | nvim-tree-mappings |
4747 7.1 Mappings: Default | nvim-tree-mappings-default |
4848 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 |
5051 9. Events | nvim-tree-events |
5152 10. Prompts | nvim-tree-prompts |
5253 11. OS Specific Restrictions | nvim-tree-os-specific |
@@ -846,7 +847,7 @@ Value can be `"none"`, `"icon"`, `"name"` or `"all"`.
846847
847848*nvim-tree.renderer.highlight_opened_files*
848849Highlight icons and/or names for | bufloaded() | files using the
849- `NvimTreeOpenedFile ` highlight group.
850+ `NvimTreeOpenedHL ` highlight group.
850851See | nvim-tree-api.navigate.opened.next() | and | nvim-tree-api.navigate.opened.prev() |
851852Value can be `" none" ` , `" icon" ` , `" name" ` or `" all" ` .
852853 Type: `string ` , Default: `" none" `
@@ -2240,12 +2241,29 @@ groups.
22402241Example | :highlight | >
22412242 :hi NvimTreeSymlink guifg=blue gui=bold,underline
22422243<
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.
22442246
22452247To view the active highlight groups run `:so $VIMRUNTIME/syntax/hitest.vim`
22462248as per | :highlight |
22472249
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:
22492267
22502268Standard: >
22512269 NvimTreeNormal Normal
@@ -2266,14 +2284,13 @@ Standard: >
22662284 NvimTreeStatusLineNC StatusLineNC
22672285<
22682286File 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
22742291<
22752292Folder Text: >
2276- NvimTreeRootFolder PreProc
2293+ NvimTreeRootFolder Title
22772294 NvimTreeFolderName Directory
22782295 NvimTreeEmptyFolderName Directory
22792296 NvimTreeOpenedFolderName Directory
@@ -2282,7 +2299,6 @@ Folder Text: >
22822299File Icons: >
22832300 NvimTreeFileIcon NvimTreeNormal
22842301 NvimTreeSymlinkIcon NvimTreeNormal
2285- NvimTreeOpenedFileIcon NvimTreeOpenedFile
22862302<
22872303Folder Icons: >
22882304 NvimTreeFolderIcon guifg=#8094b4 ctermfg=Blue
@@ -2306,16 +2322,16 @@ Clipboard: >
23062322 NvimTreeCutHL SpellBad
23072323<
23082324Bookmarks: >
2309- NvimTreeBookmarkIcon Constant
2325+ NvimTreeBookmarkIcon NvimTreeFolderIcon
23102326 NvimTreeBookmarkHL SpellLocal
23112327<
23122328Modified: >
2313- NvimTreeModifiedIcon Constant
2329+ NvimTreeModifiedIcon Type
23142330 NvimTreeModifiedFileHL NvimTreeModifiedIcon
23152331 NvimTreeModifiedFolderHL NvimTreeModifiedIcon
23162332<
23172333Opened: >
2318- NvimTreeOpenedHL Constant
2334+ NvimTreeOpenedHL Special
23192335<
23202336Git Icon: >
23212337 NvimTreeGitDeletedIcon Statement
@@ -2377,6 +2393,17 @@ Diagnostics Folder Highlight: >
23772393- `highlight_xxx` is additive instead of overwriting. See
23782394 | nvim-tree-opts-renderer | for precedence.
23792395
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+
23802407Legacy highlight group are still obeyed when they are defined and the current
23812408highlight group is not, hard linking as follows: >
23822409
0 commit comments