mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-01-09 04:07:16 +00:00
modules: explicit lib usage
This commit is contained in:
parent
9b2e2ef833
commit
caf342adb1
27 changed files with 673 additions and 684 deletions
|
|
@ -1,18 +1,20 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf nvim optionalString boolToString;
|
||||
inherit (lib.strings) optionalString;
|
||||
inherit (lib.trivial) boolToString;
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
|
||||
cfg = config.vim.autopairs;
|
||||
in {
|
||||
config =
|
||||
mkIf (cfg.enable)
|
||||
{
|
||||
vim.startPlugins = ["nvim-autopairs"];
|
||||
config = mkIf cfg.enable {
|
||||
vim = {
|
||||
startPlugins = ["nvim-autopairs"];
|
||||
|
||||
vim.luaConfigRC.autopairs = nvim.dag.entryAnywhere ''
|
||||
luaConfigRC.autopairs = entryAnywhere ''
|
||||
require("nvim-autopairs").setup{}
|
||||
${optionalString (config.vim.autocomplete.type == "nvim-compe") ''
|
||||
require('nvim-autopairs.completion.compe').setup({
|
||||
|
|
@ -23,4 +25,5 @@ in {
|
|||
''}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue