modules/nvim-cmp: add perFiletype settings
This commit is contained in:
parent
94549da249
commit
d7afdf14ea
1 changed files with 9 additions and 0 deletions
|
@ -16,6 +16,11 @@ in
|
|||
type = types.attrs;
|
||||
default = { };
|
||||
};
|
||||
|
||||
perFiletype = mkOption {
|
||||
type = types.attrsOf types.attrs;
|
||||
default = {};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
@ -96,6 +101,10 @@ in
|
|||
cfg.settings
|
||||
{ snippet.expand = config.fn.nvim-cmp-snippet-expand.lambda; }
|
||||
];
|
||||
afterSetup = (lib.mapAttrsToList
|
||||
(ft: ftSettings: pipe1 varName (call "setup.filetype" [ft ftSettings]))
|
||||
cfg.perFiletype
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue