Skip to content

Commit

Permalink
add user config
Browse files Browse the repository at this point in the history
  • Loading branch information
kyazdani42 committed Oct 24, 2020
1 parent 1de3f9a commit 2254eda
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,15 @@ this might need to be re-called in a `Colorscheme` to re-apply cleared highlight
if the color scheme changes

```lua
require'nvim-web-devicons'.setup()
require'nvim-web-devicons'.setup {
-- your personnal icons can go here (to override)
-- DevIcon will be appended to `name`
zsh = {
icon = "",
color = "#428850",
name = "Zsh"
};
}
```

### Get Icon
Expand Down
4 changes: 3 additions & 1 deletion lua/nvim-web-devicons.lua
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,9 @@ return {
end
end
end,
setup = function()
setup = function(user_icons)
icons = vim.tbl_extend("force", icons, user_icons or {});

table.insert(icons, default_icon)
for _, icon_data in pairs(icons) do
if icon_data.color and icon_data.name then
Expand Down

0 comments on commit 2254eda

Please sign in to comment.