Skip to content

Commit

Permalink
refactor: use builtins nixvim devicons
Browse files Browse the repository at this point in the history
  • Loading branch information
r17x committed Jan 18, 2025
1 parent c7276c6 commit 74e6b3b
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions nvim.nix/config/ui.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
lib,
helpers,
icons,
pkgs,
Expand Down Expand Up @@ -43,16 +42,6 @@ let
};
};

deviconsToLuaString =
icons:
builtins.foldl'
(acc: icon: ''
${acc}
devicons.set_icon ${icon}
'')
"local devicons = require'nvim-web-devicons'"
(lib.attrsets.mapAttrsToList (name: value: helpers.toLuaObject { "${name}" = value; }) icons);

in
{
highlight."@neorg.tags.ranged_verbatim.code_block".link = "Fg";
Expand Down Expand Up @@ -192,9 +181,6 @@ in
-- treesitter folding
vim.cmd [[ set nofoldenable ]]
-- devicons
${deviconsToLuaString devicons}
'';

colorscheme = "edge";
Expand Down Expand Up @@ -242,6 +228,7 @@ in
'';

plugins.web-devicons.enable = true;
plugins.web-devicons.customIcons = devicons;

# based on {https://github.com/r17x/nixpkgs/blob/main/configs/nvim/lua/config/lualine.lua}
plugins.lualine.enable = true;
Expand Down

0 comments on commit 74e6b3b

Please sign in to comment.