mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-03 05:44:31 +02:00
plugins/cmp-tabnine: move to by-name
This commit is contained in:
parent
79a637d196
commit
7aed1c4b57
4 changed files with 116 additions and 22 deletions
67
plugins/by-name/cmp-tabnine/default.nix
Normal file
67
plugins/by-name/cmp-tabnine/default.nix
Normal file
|
@ -0,0 +1,67 @@
|
|||
{ lib, ... }:
|
||||
let
|
||||
inherit (lib) types;
|
||||
inherit (lib.nixvim) defaultNullOpts;
|
||||
in
|
||||
lib.nixvim.neovim-plugin.mkNeovimPlugin {
|
||||
name = "cmp-tabnine";
|
||||
|
||||
maintainers = [ lib.maintainers.GaetanLepage ];
|
||||
|
||||
imports = [
|
||||
{ cmpSourcePlugins.cmp_tabnine = "cmp-tabnine"; }
|
||||
];
|
||||
|
||||
deprecateExtraOptions = true;
|
||||
|
||||
moduleName = "cmp_tabnine.config";
|
||||
setup = ":setup";
|
||||
|
||||
settingsOptions = {
|
||||
max_lines = defaultNullOpts.mkUnsignedInt 1000 ''
|
||||
How many lines of buffer context to pass to TabNine.
|
||||
'';
|
||||
|
||||
max_num_results = defaultNullOpts.mkUnsignedInt 20 ''
|
||||
How many results to return.
|
||||
'';
|
||||
|
||||
sort = defaultNullOpts.mkBool true ''
|
||||
Sort results by returned priority.
|
||||
'';
|
||||
|
||||
run_on_every_keystroke = defaultNullOpts.mkBool true ''
|
||||
Generate new completion items on every keystroke.
|
||||
|
||||
For more info, check out [#18](https://github.com/tzachar/cmp-tabnine/issues/18).
|
||||
'';
|
||||
|
||||
snippet_placeholder = defaultNullOpts.mkStr ".." ''
|
||||
Indicates where the cursor will be placed in case a completion item is asnippet.
|
||||
Any string is accepted.
|
||||
|
||||
For this to work properly, you need to setup snippet support for `nvim-cmp`.
|
||||
'';
|
||||
|
||||
ignored_file_types = defaultNullOpts.mkAttrsOf' {
|
||||
type = types.bool;
|
||||
pluginDefault = { };
|
||||
example = {
|
||||
lua = true;
|
||||
};
|
||||
description = ''
|
||||
Which file types to ignore.
|
||||
'';
|
||||
};
|
||||
|
||||
min_percent = defaultNullOpts.mkNullable (types.numbers.between 0 100) 0 ''
|
||||
Eliminate items with a percentage less than `min_percent`.
|
||||
'';
|
||||
};
|
||||
|
||||
settingsExample = {
|
||||
max_lines = 600;
|
||||
max_num_results = 10;
|
||||
sort = false;
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue