neovim-flake/modules/plugins/ui/illuminate/config.nix

24 lines
556 B
Nix
Raw Normal View History

2023-06-06 03:05:05 +03:00
{
config,
lib,
...
}: let
inherit (lib.modules) mkIf;
inherit (lib.nvim.lua) toLuaObject;
inherit (lib.nvim.dag) entryAnywhere;
2023-06-06 03:05:05 +03:00
cfg = config.vim.ui.illuminate;
in {
config = mkIf cfg.enable {
vim = {
startPlugins = ["vim-illuminate"];
2023-06-06 03:05:05 +03:00
# vim-illuminate does not have a setup function. It is instead called 'configure'
# and does what you expect from a setup function. Wild.
pluginRC.vim-illuminate = entryAnywhere ''
require('illuminate').configure(${toLuaObject cfg.setupOpts})
'';
};
2023-06-06 03:05:05 +03:00
};
}