mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-02-07 04:15:51 +00:00
feat(modes): custom setup opts
This commit is contained in:
parent
5387ca2b5a
commit
64f167e7c5
2 changed files with 36 additions and 39 deletions
|
|
@ -4,8 +4,8 @@
|
|||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.trivial) boolToString;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
|
||||
cfg = config.vim.ui.modes-nvim;
|
||||
in {
|
||||
|
|
@ -15,18 +15,7 @@ in {
|
|||
];
|
||||
|
||||
vim.luaConfigRC.modes-nvim = entryAnywhere ''
|
||||
require('modes').setup({
|
||||
set_cursorline = ${boolToString cfg.setCursorline},
|
||||
line_opacity = {
|
||||
visual = 0,
|
||||
},
|
||||
colors = {
|
||||
copy = "${toString cfg.colors.copy}",
|
||||
delete = "${toString cfg.colors.delete}",
|
||||
insert = "${toString cfg.colors.insert}",
|
||||
visual = "${toString cfg.colors.visual}",
|
||||
},
|
||||
})
|
||||
require('modes').setup(${toLuaObject cfg.setupOpts})
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue