diff --git a/README.md b/README.md index 0985d40b278..bc4983c8beb 100644 --- a/README.md +++ b/README.md @@ -112,6 +112,23 @@ require("nvim-tree").setup { } ``` +### Highlight + +Run `:NvimTreeHiTest` to show all the highlights that nvim-tree uses. + +They can be customised before or after setup is called and will be immediately +applied at runtime. e.g. + +```lua +vim.cmd([[ + :hi NvimTreeExecFile guifg=#ffa0a0 + :hi NvimTreeSpecialFile guifg=#ff80ff gui=underline + :hi NvimTreeSymlink guifg=Yellow gui=italic + :hi link NvimTreeImageFile Title +]]) +``` +See [:help nvim-tree-highlight](doc/nvim-tree-lua.txt) for details. + ## Commands See [:help nvim-tree-commands](doc/nvim-tree-lua.txt) diff --git a/doc/nvim-tree-lua.txt b/doc/nvim-tree-lua.txt index ced571f17c4..241f4458d60 100644 --- a/doc/nvim-tree-lua.txt +++ b/doc/nvim-tree-lua.txt @@ -238,8 +238,15 @@ via |nvim-tree.on_attach| e.g. > Run |:NvimTreeHiTest| to show all the highlights that nvim-tree uses. They can be customised before or after setup is called and will be immediately -applied at runtime. - +applied at runtime. e.g. > + + vim.cmd([[ + :hi NvimTreeExecFile guifg=#ffa0a0 + :hi NvimTreeSpecialFile guifg=#ff80ff gui=underline + :hi NvimTreeSymlink guifg=Yellow gui=italic + :hi link NvimTreeImageFile Title + ]]) +< See |nvim-tree-highlight| for details. ============================================================================== @@ -2444,6 +2451,15 @@ Diagnostics Folder Highlight: > - NvimTreeSpecialFile PreProc -> SpellCap - NvimTreeSymlink Statement -> SpellCap +Approximate pre-overhaul values for the `SpellCap` groups may be set via: > + + vim.cmd([[ + :hi NvimTreeExecFile gui=bold guifg=#ffa0a0 + :hi NvimTreeSymlink gui=bold guifg=#ffff60 + :hi NvimTreeSpecialFile gui=bold,underline guifg=#ff80ff + :hi NvimTreeImageFile gui=bold guifg=#ff80ff + ]]) +< Legacy highlight group are still obeyed when they are defined and the current highlight group is not, hard linking as follows: >