@codemirror/autocomplete
Advanced tools
Comparing version 6.0.4 to 6.1.0
@@ -0,1 +1,9 @@ | ||
## 6.1.0 (2022-07-19) | ||
### New features | ||
You can now provide a `compareCompletions` option to autocompletion to influence the way completions with the same match score are sorted. | ||
The `selectOnOpen` option to autocompletion can be used to require explicitly selecting a completion option before `acceptCompletion` does anything. | ||
## 6.0.4 (2022-07-07) | ||
@@ -2,0 +10,0 @@ |
@@ -13,2 +13,11 @@ import * as _codemirror_state from '@codemirror/state'; | ||
/** | ||
By default, when completion opens, the first option is selected | ||
and can be confirmed with | ||
[`acceptCompletion`](https://codemirror.net/6/docs/ref/#autocomplete.acceptCompletion). When this | ||
is set to false, the completion widget starts with no completion | ||
selected, and the user has to explicitly move to a completion | ||
before you can confirm one. | ||
*/ | ||
selectOnOpen?: boolean; | ||
/** | ||
Override the completion sources used. By default, they will be | ||
@@ -67,2 +76,8 @@ taken from the `"autocomplete"` [language | ||
}[]; | ||
/** | ||
The comparison function to use when sorting completions with the same | ||
match score. Defaults to using | ||
[`localeCompare`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/localeCompare). | ||
*/ | ||
compareCompletions?: (a: Completion, b: Completion) => number; | ||
} | ||
@@ -69,0 +84,0 @@ |
{ | ||
"name": "@codemirror/autocomplete", | ||
"version": "6.0.4", | ||
"version": "6.1.0", | ||
"description": "Autocompletion for the CodeMirror code editor", | ||
@@ -5,0 +5,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
177679
3984