2023-04-03 11:12:05 +02:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
with lib;
|
|
|
|
with builtins; let
|
|
|
|
cfg = config.vim.ui.modes-nvim;
|
|
|
|
in {
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
vim.startPlugins = [
|
|
|
|
"modes-nvim"
|
|
|
|
];
|
|
|
|
|
|
|
|
vim.luaConfigRC.modes-nvim = nvim.dag.entryAnywhere ''
|
2023-06-06 00:49:38 +02:00
|
|
|
require('modes').setup({
|
2023-06-06 01:33:18 +02:00
|
|
|
set_cursorline = ${boolToString cfg.setCursorline},
|
|
|
|
colors = {
|
|
|
|
copy = "${toString cfg.colors.copy}",
|
|
|
|
delete = "${toString cfg.colors.delete}",
|
|
|
|
insert = "${toString cfg.colors.insert}",
|
|
|
|
visual = "${toString cfg.colors.visual}",
|
|
|
|
},
|
2023-06-06 00:49:38 +02:00
|
|
|
})
|
2023-04-03 11:12:05 +02:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|