plugins/completion/nvim-cmp: add extraOptions option for the cmp-tabnine plugin (#180)

This commit is contained in:
Gaétan Lepage 2023-02-23 00:32:55 +01:00 committed by GitHub
parent a15c0543a4
commit ff4292f2be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 0 deletions

View file

@ -0,0 +1,18 @@
{
pkgs,
config,
lib,
...
}:
with lib; let
cfg = config.plugins.cmp-tabnine;
helpers = import ../../../helpers.nix {inherit lib;};
in {
options.plugins.cmp-tabnine = helpers.extraOptionsOptions;
config = mkIf cfg.enable {
extraConfigLua = ''
require('cmp_tabnine.config'):setup(${helpers.toLuaObject cfg.extraOptions})
'';
};
}

View file

@ -11,6 +11,7 @@ in {
# For extra cmp plugins
imports =
[
./cmp-tabnine.nix
]
++ pluginModules;
}