nvf/modules/ui/colorizer/config.nix

22 lines
395 B
Nix
Raw Normal View History

{
config,
lib,
...
}: let
inherit (lib.modules) mkIf;
inherit (lib.nvim.dag) entryAnywhere;
2024-03-10 18:45:26 +00:00
inherit (lib.nvim.lua) toLuaObject;
cfg = config.vim.ui.colorizer;
in {
config = mkIf cfg.enable {
vim.startPlugins = [
"nvim-colorizer-lua"
];
vim.luaConfigRC.colorizer = entryAnywhere ''
2024-03-10 18:45:26 +00:00
require('colorizer').setup(${toLuaObject cfg.setupOpts})
'';
};
}