Skip to content

Commit

Permalink
feat: default to noicon without "devicons"
Browse files Browse the repository at this point in the history
- defaults to the `noicon` when `nvim-web-devicons` is not present

- default stays at `default` when `nvim-web-devicons` is present
  • Loading branch information
l-kershaw authored and famiu committed Jul 3, 2021
1 parent ac91701 commit ae9e609
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lua/feline/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,12 @@ function M.setup(config)
if parse_config(config, "preset", "string") then
preset = presets[config.preset]
else
preset = presets["default"]
local has_devicons = pcall(require,'nvim-web-devicons')
if has_devicons then
preset = presets["default"]
else
preset = presets["noicon"]
end
end

custom_colors = parse_config(config, "colors", "table", {})
Expand Down

0 comments on commit ae9e609

Please sign in to comment.