mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-24 01:38:40 +02:00
plugins/completion/nvim-cmp: add extraOptions option for the cmp-tabnine plugin (#180)
This commit is contained in:
parent
a15c0543a4
commit
ff4292f2be
2 changed files with 19 additions and 0 deletions
18
plugins/completion/nvim-cmp/sources/cmp-tabnine.nix
Normal file
18
plugins/completion/nvim-cmp/sources/cmp-tabnine.nix
Normal 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})
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
|
@ -11,6 +11,7 @@ in {
|
||||||
# For extra cmp plugins
|
# For extra cmp plugins
|
||||||
imports =
|
imports =
|
||||||
[
|
[
|
||||||
|
./cmp-tabnine.nix
|
||||||
]
|
]
|
||||||
++ pluginModules;
|
++ pluginModules;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue