mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-24 09:48:42 +02:00
plugins/nvim-cmp: fix crates-nvim source plugin
This commit is contained in:
parent
895998b5a7
commit
520e1804e4
2 changed files with 18 additions and 0 deletions
17
plugins/completion/nvim-cmp/sources/crates-nvim.nix
Normal file
17
plugins/completion/nvim-cmp/sources/crates-nvim.nix
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.plugins.crates-nvim;
|
||||||
|
helpers = import ../../../helpers.nix {inherit lib;};
|
||||||
|
in {
|
||||||
|
options.plugins.crates-nvim = helpers.extraOptionsOptions;
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
extraConfigLua = ''
|
||||||
|
require('crates').setup(${helpers.toLuaObject cfg.extraOptions})
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
|
@ -12,6 +12,7 @@ in {
|
||||||
imports =
|
imports =
|
||||||
[
|
[
|
||||||
./cmp-tabnine.nix
|
./cmp-tabnine.nix
|
||||||
|
./crates-nvim.nix
|
||||||
]
|
]
|
||||||
++ pluginModules;
|
++ pluginModules;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue