Skip to content

Commit e08a61d

Browse files
committed
activate autocomplete when completion ends with :
as in `tag:` or `deck:`
1 parent 655b4b1 commit e08a61d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

app/src/components/queryEditor.tsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,10 @@ const basicSetup = [
100100
syntaxHighlighting(defaultHighlightStyle, { fallback: true }),
101101
bracketMatching(),
102102
closeBrackets(),
103-
autocompletion(),
103+
autocompletion({
104+
activateOnCompletion: ({ apply }) =>
105+
typeof apply === 'string' && apply.slice(-1) === ':',
106+
}),
104107
highlightSelectionMatches(),
105108
keymap.of([
106109
...closeBracketsKeymap,

0 commit comments

Comments
 (0)