mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-28 11:30:06 +02:00
plugins/nvim-cmp: update options
This commit is contained in:
parent
51afeda8e5
commit
8338cf146f
2 changed files with 17 additions and 6 deletions
|
@ -21,7 +21,7 @@ in {
|
|||
|
||||
package = helpers.mkPackageOption "nvim-cmp" pkgs.vimPlugins.nvim-cmp;
|
||||
|
||||
performance = helpers.mkCompositeOption "Performance options" {
|
||||
performance = {
|
||||
debounce = helpers.defaultNullOpts.mkInt 60 ''
|
||||
Sets debounce time
|
||||
This is the interval used to group up completions from different sources
|
||||
|
@ -37,6 +37,14 @@ in {
|
|||
Sets the timeout of candidate fetching process.
|
||||
The nvim-cmp will wait to display the most prioritized source.
|
||||
'';
|
||||
|
||||
asyncBudget = helpers.defaultNullOpts.mkInt 1 ''
|
||||
Maximum time (in ms) an async function is allowed to run during one step of the event loop.
|
||||
'';
|
||||
|
||||
maxViewEntries = helpers.defaultNullOpts.mkInt 200 ''
|
||||
Maximum number of items to show in the entries list.
|
||||
'';
|
||||
};
|
||||
|
||||
preselect = helpers.defaultNullOpts.mkEnumFirstDefault ["Item" "None"] ''
|
||||
|
@ -289,8 +297,6 @@ in {
|
|||
|
||||
priority = helpers.mkNullOrOption types.int "The source-specific priority value.";
|
||||
|
||||
maxItemCount = helpers.mkNullOrOption types.int "The source-specific item count.";
|
||||
|
||||
groupIndex = helpers.mkNullOrOption types.int ''
|
||||
The source group index.
|
||||
|
||||
|
@ -470,7 +476,12 @@ in {
|
|||
then null
|
||||
else false;
|
||||
|
||||
inherit (cfg) performance;
|
||||
performance = with cfg.performance; {
|
||||
inherit debounce throttle;
|
||||
fetching_timeout = fetchingTimeout;
|
||||
async_budget = asyncBudget;
|
||||
max_view_entries = maxViewEntries;
|
||||
};
|
||||
preselect =
|
||||
helpers.ifNonNull' cfg.preselect
|
||||
(helpers.mkRaw "cmp.PreselectMode.${cfg.preselect}");
|
||||
|
@ -596,8 +607,6 @@ in {
|
|||
|
||||
inherit (source) priority;
|
||||
|
||||
max_item_count = source.maxItemCount;
|
||||
|
||||
group_index = source.groupIndex;
|
||||
|
||||
entry_filter = source.entryFilter;
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
debounce = 60;
|
||||
throttle = 30;
|
||||
fetchingTimeout = 500;
|
||||
asyncBudget = 1;
|
||||
maxViewEntries = 200;
|
||||
};
|
||||
|
||||
preselect = "Item";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue