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