Diffdown is a real-time collaborative Markdown editor/previewer built on the AT Protocol
diffdown.com
1## 6.20.1 (2026-03-02)
2
3### Bug fixes
4
5Clicking the horizontal dots at the top/bottom of a list of completion options now moves the selection there, so that more completions become visible.
6## 6.20.0 (2025-11-20)
7
8### New features
9
10Completions now support a `sortText` property to influence sort order.
11
12## 6.19.1 (2025-10-23)
13
14### Bug fixes
15
16Make sure a completion's info panel is associated with that completion in the accessibility tree.
17
18## 6.19.0 (2025-09-26)
19
20### New features
21
22Completion sections may now set their rank to `dynamic` to indicate their order should be determined by the matching score of their best-matching option.
23
24## 6.18.7 (2025-09-02)
25
26### Bug fixes
27
28Add a binding for Alt-i to trigger `startCompletion`, following VS Code's current default bindings.
29
30Improve handling of nested fields in snippets.
31
32## 6.18.6 (2025-02-12)
33
34### Bug fixes
35
36Fix an issue where the closing character for double-angle quotation marks and full-width brackets was computed incorrectly.
37
38## 6.18.5 (2025-02-11)
39
40### Bug fixes
41
42Fix an issue where clicking on the scrollbar for the completion list could move focus out of the editor.
43
44## 6.18.4 (2024-12-17)
45
46### Bug fixes
47
48Align the behavior of snippet completions with text completions in that they overwrite the selected text.
49
50## 6.18.3 (2024-11-13)
51
52### Bug fixes
53
54Backspacing to the start of the completed range will no longer close the completion tooltip when it was triggered implicitly by typing the character before that range.
55
56## 6.18.2 (2024-10-30)
57
58### Bug fixes
59
60Don't immediately show synchronously updated completions when there are some sources that still need to return.
61
62## 6.18.1 (2024-09-14)
63
64### Bug fixes
65
66Fix an issue where `insertCompletionText` would get confused about the length of the inserted text when it contained CRLF line breaks, and create an invalid selection.
67
68Add Alt-Backtick as additional binding on macOS, where IME can take over Ctrl-Space.
69
70## 6.18.0 (2024-08-05)
71
72### Bug fixes
73
74Style the info element so that newlines are preserved, to make it easier to display multi-line info from a string source.
75
76### New features
77
78When registering an `abort` handler for a completion query, you can now use the `onDocChange` option to indicate that your query should be aborted as soon as the document changes while it is running.
79
80## 6.17.0 (2024-07-03)
81
82### Bug fixes
83
84Fix an issue where completions weren't properly reset when starting a new completion through `activateOnCompletion`.
85
86### New features
87
88`CompletionContext` objects now have a `view` property that holds the editor view when the query context has a view available.
89
90## 6.16.3 (2024-06-19)
91
92### Bug fixes
93
94Avoid adding an `aria-autocomplete` attribute to the editor when there are no active sources active.
95
96## 6.16.2 (2024-05-31)
97
98### Bug fixes
99
100Allow backslash-escaped closing braces inside snippet field names/content.
101
102## 6.16.1 (2024-05-29)
103
104### Bug fixes
105
106Fix a bug where multiple backslashes before a brace in a snippet were all removed.
107
108## 6.16.0 (2024-04-12)
109
110### New features
111
112The new `activateOnCompletion` option allows autocompletion to be configured to chain completion activation for some types of completions.
113
114## 6.15.0 (2024-03-13)
115
116### New features
117
118The new `filterStrict` option can be used to turn off fuzzy matching of completions.
119
120## 6.14.0 (2024-03-10)
121
122### New features
123
124Completion results can now define a `map` method that can be used to adjust position-dependent information for document changes.
125
126## 6.13.0 (2024-02-29)
127
128### New features
129
130Completions may now provide 'commit characters' that, when typed, commit the completion before inserting the character.
131
132## 6.12.0 (2024-01-12)
133
134### Bug fixes
135
136Make sure snippet completions also set `userEvent` to `input.complete`.
137
138Fix a crash when the editor lost focus during an update and autocompletion was active.
139
140Fix a crash when using a snippet that has only one field, but multiple instances of that field.
141
142### New features
143
144The new `activateOnTypingDelay` option allows control over the debounce time before the completions are queried when the user types.
145
146## 6.11.1 (2023-11-27)
147
148### Bug fixes
149
150Fix a bug that caused typing over closed brackets after pressing enter to still not work in many situations.
151
152## 6.11.0 (2023-11-09)
153
154### Bug fixes
155
156Fix an issue that would prevent typing over closed brackets after starting a new line with enter.
157
158### New features
159
160Additional elements rendered in completion options with `addToOptions` are now given access to the editor view.
161
162## 6.10.2 (2023-10-13)
163
164### Bug fixes
165
166Fix a bug that caused `updateSyncTime` to always delay the initial population of the tooltip.
167
168## 6.10.1 (2023-10-11)
169
170### Bug fixes
171
172Fix a bug where picking a selection with the mouse could use the wrong completion if the completion list was updated after being opened.
173
174## 6.10.0 (2023-10-11)
175
176### New features
177
178The new autocompletion configuration option `updateSyncTime` allows control over how long fast sources are held back waiting for slower completion sources.
179
180## 6.9.2 (2023-10-06)
181
182### Bug fixes
183
184Fix a bug in `completeAnyWord` that could cause it to generate invalid regular expressions and crash.
185
186## 6.9.1 (2023-09-14)
187
188### Bug fixes
189
190Make sure the cursor is scrolled into view after inserting completion text.
191
192Make sure scrolling completions into view doesn't get confused when the tooltip is scaled.
193
194## 6.9.0 (2023-07-18)
195
196### New features
197
198Completions may now provide a `displayLabel` property that overrides the way they are displayed in the completion list.
199
200## 6.8.1 (2023-06-23)
201
202### Bug fixes
203
204`acceptCompletion` now returns false (allowing other handlers to take effect) when the completion popup is open but disabled.
205
206## 6.8.0 (2023-06-12)
207
208### New features
209
210The result of `Completion.info` may now include a `destroy` method that will be called when the tooltip is removed.
211
212## 6.7.1 (2023-05-13)
213
214### Bug fixes
215
216Fix a bug that cause incorrect ordering of completions when some results covered input text and others didn't.
217
218## 6.7.0 (2023-05-11)
219
220### New features
221
222The new `hasNextSnippetField` and `hasPrevSnippetField` functions can be used to figure out if the snippet-field-motion commands apply to a given state.
223
224## 6.6.1 (2023-05-03)
225
226### Bug fixes
227
228Fix a bug that made the editor use the completion's original position, rather than its current position, when changes happened in the document while a result was active.
229
230## 6.6.0 (2023-04-27)
231
232### Bug fixes
233
234Fix a bug in `insertCompletionText` that caused it to replace the wrong range when a result set's `to` fell after the cursor.
235
236### New features
237
238Functions returned by `snippet` can now be called without a completion object.
239
240## 6.5.1 (2023-04-13)
241
242### Bug fixes
243
244Keep completions open when interaction with an info tooltip moves focus out of the editor.
245
246## 6.5.0 (2023-04-13)
247
248### Bug fixes
249
250When `closeBrackets` skips a bracket, it now generates a change that overwrites the bracket.
251
252Replace the entire selected range when picking a completion with a non-cursor selection active.
253
254### New features
255
256Completions can now provide a `section` field that is used to group them into sections.
257
258The new `positionInfo` option can be used to provide custom logic for positioning the info tooltips.
259
260## 6.4.2 (2023-02-17)
261
262### Bug fixes
263
264Fix a bug where the apply method created by `snippet` didn't add a `pickedCompletion` annotation to the transactions it created.
265
266## 6.4.1 (2023-02-14)
267
268### Bug fixes
269
270Don't consider node names in trees that aren't the same language as the one at the completion position in `ifIn` and `ifNotIn`.
271
272Make sure completions that exactly match the input get a higher score than those that don't (so that even if the latter has a score boost, it ends up lower in the list).
273
274## 6.4.0 (2022-12-14)
275
276### Bug fixes
277
278Fix an issue where the extension would sometimes try to draw a disabled dialog at an outdated position, leading to plugin crashes.
279
280### New features
281
282A `tooltipClass` option to autocompletion can now be used to add additional CSS classes to the completion tooltip.
283
284## 6.3.4 (2022-11-24)
285
286### Bug fixes
287
288Fix an issue where completion lists could end up being higher than the tooltip they were in.
289
290## 6.3.3 (2022-11-18)
291
292### Bug fixes
293
294Set an explicit `box-sizing` style on completion icons so CSS resets don't mess them up.
295
296Allow closing braces in templates to be escaped with a backslash.
297
298## 6.3.2 (2022-11-15)
299
300### Bug fixes
301
302Fix a regression that could cause the completion dialog to stick around when it should be hidden.
303
304## 6.3.1 (2022-11-14)
305
306### Bug fixes
307
308Fix a regression where transactions for picking a completion (without custom `apply` method) no longer had the `pickedCompletion` annotation.
309
310Reduce flickering for completion sources without `validFor` info by temporarily showing a disabled tooltip while the completion updates.
311
312Make sure completion info tooltips are kept within the space provided by the `tooltipSpace` option.
313
314## 6.3.0 (2022-09-22)
315
316### New features
317
318Close bracket configuration now supports a `stringPrefixes` property that can be used to allow autoclosing of prefixed strings.
319
320## 6.2.0 (2022-09-13)
321
322### New features
323
324Autocompletion now takes an `interactionDelay` option that can be used to control the delay between the time where completion opens and the time where commands like `acceptCompletion` affect it.
325
326## 6.1.1 (2022-09-08)
327
328### Bug fixes
329
330Fix a bug that prevented transactions produced by `deleteBracketPair` from being marked as deletion user events.
331
332Improve positioning of completion info tooltips so they are less likely to stick out of the screen on small displays.
333
334## 6.1.0 (2022-07-19)
335
336### New features
337
338You can now provide a `compareCompletions` option to autocompletion to influence the way completions with the same match score are sorted.
339
340The `selectOnOpen` option to autocompletion can be used to require explicitly selecting a completion option before `acceptCompletion` does anything.
341
342## 6.0.4 (2022-07-07)
343
344### Bug fixes
345
346Remove a leftover `console.log` in bracket closing code.
347
348## 6.0.3 (2022-07-04)
349
350### Bug fixes
351
352Fix a bug that caused `closeBrackets` to not close quotes when at the end of a syntactic construct that starts with a similar quote.
353
354## 6.0.2 (2022-06-15)
355
356### Bug fixes
357
358Declare package dependencies as peer dependencies as an attempt to avoid duplicated package issues.
359
360## 6.0.1 (2022-06-09)
361
362### Bug fixes
363
364Support escaping `${` or `#{` in snippets.
365
366## 6.0.0 (2022-06-08)
367
368### Bug fixes
369
370Scroll the cursor into view when inserting a snippet.
371
372## 0.20.3 (2022-05-30)
373
374### Bug fixes
375
376Add an aria-label to the completion listbox.
377
378Fix a regression that caused transactions generated for completion to not have a `userEvent` annotation.
379
380## 0.20.2 (2022-05-24)
381
382### New features
383
384The package now exports an `insertCompletionText` helper that implements the default behavior for applying a completion.
385
386## 0.20.1 (2022-05-16)
387
388### New features
389
390The new `closeOnBlur` option determines whether the completion tooltip is closed when the editor loses focus.
391
392`CompletionResult` objects with `filter: false` may now have a `getMatch` property that determines the matched range in the options.
393
394## 0.20.0 (2022-04-20)
395
396### Breaking changes
397
398`CompletionResult.span` has been renamed to `validFor`, and may now hold a function as well as a regular expression.
399
400### Bug fixes
401
402Remove code that dropped any options beyond the 300th one when matching and sorting option lists.
403
404Completion will now apply to all cursors when there are multiple cursors.
405
406### New features
407
408`CompletionResult.update` can now be used to implement quick autocompletion updates in a synchronous way.
409
410The @codemirror/closebrackets package was merged into this one.
411
412## 0.19.15 (2022-03-23)
413
414### New features
415
416The `selectedCompletionIndex` function tells you the position of the currently selected completion.
417
418The new `setSelectionCompletion` function creates a state effect that moves the selected completion to a given index.
419
420A completion's `info` method may now return null to indicate that no further info is available.
421
422## 0.19.14 (2022-03-10)
423
424### Bug fixes
425
426Make the ARIA attributes added to the editor during autocompletion spec-compliant.
427
428## 0.19.13 (2022-02-18)
429
430### Bug fixes
431
432Fix an issue where the completion tooltip stayed open if it was explicitly opened and the user backspaced past its start.
433
434Stop snippet filling when a change happens across one of the snippet fields' boundaries.
435
436## 0.19.12 (2022-01-11)
437
438### Bug fixes
439
440Fix completion navigation with PageUp/Down when the completion tooltip isn't part of the view DOM.
441
442## 0.19.11 (2022-01-11)
443
444### Bug fixes
445
446Fix a bug that caused page up/down to only move the selection by two options in the completion tooltip.
447
448## 0.19.10 (2022-01-05)
449
450### Bug fixes
451
452Make sure the info tooltip is hidden when the selected option is scrolled out of view.
453
454Fix a bug in the completion ranking that would sometimes give options that match the input by word start chars higher scores than appropriate.
455
456Options are now sorted (ascending) by length when their match score is otherwise identical.
457
458## 0.19.9 (2021-11-26)
459
460### Bug fixes
461
462Fix an issue where info tooltips would be visible in an inappropriate position when there was no room to place them properly.
463
464## 0.19.8 (2021-11-17)
465
466### Bug fixes
467
468Give the completion tooltip a minimal width, and show ellipsis when completions overflow the tooltip width.
469
470### New features
471
472`autocompletion` now accepts an `aboveCursor` option to make the completion tooltip show up above the cursor.
473
474## 0.19.7 (2021-11-16)
475
476### Bug fixes
477
478Make option deduplication less aggressive, so that options with different `type` or `apply` fields don't get merged.
479
480## 0.19.6 (2021-11-12)
481
482### Bug fixes
483
484Fix an issue where parsing a snippet with a field that was labeled only by a number crashed.
485
486## 0.19.5 (2021-11-09)
487
488### Bug fixes
489
490Make sure info tooltips don't stick out of the bottom of the page.
491
492### New features
493
494The package exports a new function `selectedCompletion`, which can be used to find out which completion is currently selected.
495
496Transactions created by picking a completion now have an annotation (`pickedCompletion`) holding the original completion.
497
498## 0.19.4 (2021-10-24)
499
500### Bug fixes
501
502Don't rely on the platform's highlight colors for the active completion, since those are inconsistent and may not be appropriate for the theme.
503
504Fix incorrect match underline for some kinds of matched completions.
505
506## 0.19.3 (2021-08-31)
507
508### Bug fixes
509
510Improve the sorting of completions by using `localeCompare`.
511
512Fix reading of autocompletions in NVDA screen reader.
513
514### New features
515
516The new `icons` option can be used to turn off icons in the completion list.
517
518The `optionClass` option can now be used to add CSS classes to the options in the completion list.
519
520It is now possible to inject additional content into rendered completion options with the `addToOptions` configuration option.
521
522## 0.19.2 (2021-08-25)
523
524### Bug fixes
525
526Fix an issue where `completeAnyWord` would return results when there was no query and `explicit` was false.
527
528## 0.19.1 (2021-08-11)
529
530### Bug fixes
531
532Fix incorrect versions for @lezer dependencies.
533
534## 0.19.0 (2021-08-11)
535
536### Breaking changes
537
538Update dependencies to 0.19.0
539
540## 0.18.8 (2021-06-30)
541
542### New features
543
544Add an `ifIn` helper function that constrains a completion source to only fire when in a given syntax node. Add support for unfiltered completions
545
546A completion result can now set a `filter: false` property to disable filtering and sorting of completions, when it already did so itself.
547
548## 0.18.7 (2021-06-14)
549
550### Bug fixes
551
552Don't treat continued completions when typing after an explicit completion as explicit.
553
554## 0.18.6 (2021-06-03)
555
556### Bug fixes
557
558Adding or reconfiguring completion sources will now cause them to be activated right away if a completion was active.
559
560### New features
561
562You can now specify multiple types in `Completion.type` by separating them by spaces. Small doc comment tweak for Completion.type
563
564## 0.18.5 (2021-04-23)
565
566### Bug fixes
567
568Fix a regression where snippet field selection didn't work with @codemirror/state 0.18.6.
569
570Fix a bug where snippet fields with different position numbers were inappropriately merged.
571
572## 0.18.4 (2021-04-20)
573
574### Bug fixes
575
576Fix a crash in Safari when moving the selection during composition.
577
578## 0.18.3 (2021-03-15)
579
580### Bug fixes
581
582Adjust to updated @codemirror/tooltip interface.
583
584## 0.18.2 (2021-03-14)
585
586### Bug fixes
587
588Fix unintended ES2020 output (the package contains ES6 code again).
589
590## 0.18.1 (2021-03-11)
591
592### Bug fixes
593
594Stop active completion when all sources resolve without producing any matches.
595
596### New features
597
598`Completion.info` may now return a promise.
599
600## 0.18.0 (2021-03-03)
601
602### Bug fixes
603
604Only preserve selected option across updates when it isn't the first option.
605
606## 0.17.4 (2021-01-18)
607
608### Bug fixes
609
610Fix a styling issue where the selection had become invisible inside snippet fields (when using `drawSelection`).
611
612### New features
613
614Snippet fields can now be selected with the pointing device (so that they are usable on touch devices).
615
616## 0.17.3 (2021-01-18)
617
618### Bug fixes
619
620Fix a bug where uppercase completions would be incorrectly matched against the typed input.
621
622## 0.17.2 (2021-01-12)
623
624### Bug fixes
625
626Don't bind Cmd-Space on macOS, since that already has a system default binding. Use Ctrl-Space for autocompletion.
627
628## 0.17.1 (2021-01-06)
629
630### New features
631
632The package now also exports a CommonJS module.
633
634## 0.17.0 (2020-12-29)
635
636### Breaking changes
637
638First numbered release.
639