@codemirror/autocomplete
Advanced tools
Changelog
0.20.1 (2022-05-16)
The new closeOnBlur
option determines whether the completion tooltip is closed when the editor loses focus.
CompletionResult
objects with filter: false
may now have a getMatch
property that determines the matched range in the options.
Changelog
0.20.0 (2022-04-20)
CompletionResult.span
has been renamed to validFor
, and may now hold a function as well as a regular expression.
Remove code that dropped any options beyond the 300th one when matching and sorting option lists.
Completion will now apply to all cursors when there are multiple cursors.
CompletionResult.update
can now be used to implement quick autocompletion updates in a synchronous way.
The @codemirror/closebrackets package was merged into this one.
Changelog
0.19.15 (2022-03-23)
The selectedCompletionIndex
function tells you the position of the currently selected completion.
The new setSelectionCompletion
function creates a state effect that moves the selected completion to a given index.
A completion's info
method may now return null to indicate that no further info is available.
Changelog
0.19.14 (2022-03-10)
Make the ARIA attributes added to the editor during autocompletion spec-compliant.
Changelog
0.19.13 (2022-02-18)
Fix an issue where the completion tooltip stayed open if it was explicitly opened and the user backspaced past its start.
Stop snippet filling when a change happens across one of the snippet fields' boundaries.
Changelog
0.19.12 (2022-01-11)
Fix completion navigation with PageUp/Down when the completion tooltip isn't part of the view DOM.
Changelog
0.19.11 (2022-01-11)
Fix a bug that caused page up/down to only move the selection by two options in the completion tooltip.
Changelog
0.19.10 (2022-01-05)
Make sure the info tooltip is hidden when the selected option is scrolled out of view.
Fix a bug in the completion ranking that would sometimes give options that match the input by word start chars higher scores than appropriate.
Options are now sorted (ascending) by length when their match score is otherwise identical.
Changelog
0.19.9 (2021-11-26)
Fix an issue where info tooltips would be visible in an inappropriate position when there was no room to place them properly.
Changelog
0.19.8 (2021-11-17)
Give the completion tooltip a minimal width, and show ellipsis when completions overflow the tooltip width.
autocompletion
now accepts an aboveCursor
option to make the completion tooltip show up above the cursor.