Skip to content

Commit 541f5c9

Browse files
authored
docs(readme): add instructions to fix broken icons of Nerd Fonts v3 (#921)
1 parent a9231e5 commit 541f5c9

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

README.md

+41
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,47 @@ into a buffer after installing Neo-tree by running:
357357
:lua require("neo-tree").paste_default_config()
358358
```
359359

360+
#### Configuration for Nerd Fonts v3 Users
361+
362+
The following configuration should fix broken icons if you are using Nerd Fonts v3:
363+
364+
```lua
365+
require("neo-tree").setup({
366+
default_component_configs = {
367+
icon = {
368+
folder_empty = "󰜌",
369+
folder_empty_open = "󰜌",
370+
},
371+
git_status = {
372+
symbols = {
373+
renamed = "󰁕",
374+
unstaged = "󰄱",
375+
},
376+
},
377+
},
378+
document_symbols = {
379+
kinds = {
380+
File = { icon = "󰈙", hl = "Tag" },
381+
Namespace = { icon = "󰌗", hl = "Include" },
382+
Package = { icon = "󰏖", hl = "Label" },
383+
Class = { icon = "󰌗", hl = "Include" },
384+
Property = { icon = "󰆧", hl = "@property" },
385+
Enum = { icon = "󰒻", hl = "@number" },
386+
Function = { icon = "󰊕", hl = "Function" },
387+
String = { icon = "󰀬", hl = "String" },
388+
Number = { icon = "󰎠", hl = "Number" },
389+
Array = { icon = "󰅪", hl = "Type" },
390+
Object = { icon = "󰅩", hl = "Type" },
391+
Key = { icon = "󰌋", hl = "" },
392+
Struct = { icon = "󰌗", hl = "Type" },
393+
Operator = { icon = "󰆕", hl = "Operator" },
394+
TypeParameter = { icon = "󰊄", hl = "Type" },
395+
StaticMethod = { icon = '󰠄 ', hl = 'Function' },
396+
}
397+
},
398+
-- Other options ...
399+
})
400+
```
360401

361402
## The `:Neotree` Command
362403

0 commit comments

Comments
 (0)