Skip to content

Commit 030defd

Browse files
authored
docs: add highlight examples to quickstart, document pre-overhaul SpellCap groups (#2680)
* docs: add highlight examples to quickstart, document pre-overhaul SpellLocal groups * docs: add highlight examples to quickstart * docs: document pre-overhaul SpellCap groups * docs: document pre-overhaul SpellCap groups
1 parent d35a8d5 commit 030defd

File tree

2 files changed

+35
-2
lines changed

2 files changed

+35
-2
lines changed

README.md

+17
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,23 @@ require("nvim-tree").setup {
112112
}
113113
```
114114

115+
### Highlight
116+
117+
Run `:NvimTreeHiTest` to show all the highlights that nvim-tree uses.
118+
119+
They can be customised before or after setup is called and will be immediately
120+
applied at runtime. e.g.
121+
122+
```lua
123+
vim.cmd([[
124+
:hi NvimTreeExecFile guifg=#ffa0a0
125+
:hi NvimTreeSpecialFile guifg=#ff80ff gui=underline
126+
:hi NvimTreeSymlink guifg=Yellow gui=italic
127+
:hi link NvimTreeImageFile Title
128+
]])
129+
```
130+
See [:help nvim-tree-highlight](doc/nvim-tree-lua.txt) for details.
131+
115132
## Commands
116133

117134
See [:help nvim-tree-commands](doc/nvim-tree-lua.txt)

doc/nvim-tree-lua.txt

+18-2
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,15 @@ via |nvim-tree.on_attach| e.g. >
238238
Run |:NvimTreeHiTest| to show all the highlights that nvim-tree uses.
239239

240240
They can be customised before or after setup is called and will be immediately
241-
applied at runtime.
242-
241+
applied at runtime. e.g. >
242+
243+
vim.cmd([[
244+
:hi NvimTreeExecFile guifg=#ffa0a0
245+
:hi NvimTreeSpecialFile guifg=#ff80ff gui=underline
246+
:hi NvimTreeSymlink guifg=Yellow gui=italic
247+
:hi link NvimTreeImageFile Title
248+
]])
249+
<
243250
See |nvim-tree-highlight| for details.
244251

245252
==============================================================================
@@ -2444,6 +2451,15 @@ Diagnostics Folder Highlight: >
24442451
- NvimTreeSpecialFile PreProc -> SpellCap
24452452
- NvimTreeSymlink Statement -> SpellCap
24462453

2454+
Approximate pre-overhaul values for the `SpellCap` groups may be set via: >
2455+
2456+
vim.cmd([[
2457+
:hi NvimTreeExecFile gui=bold guifg=#ffa0a0
2458+
:hi NvimTreeSymlink gui=bold guifg=#ffff60
2459+
:hi NvimTreeSpecialFile gui=bold,underline guifg=#ff80ff
2460+
:hi NvimTreeImageFile gui=bold guifg=#ff80ff
2461+
]])
2462+
<
24472463
Legacy highlight group are still obeyed when they are defined and the current
24482464
highlight group is not, hard linking as follows: >
24492465

0 commit comments

Comments
 (0)