Skip to content

Commit 0b79ea1

Browse files
committed
Fix #3086
1 parent b75cc13 commit 0b79ea1

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

frontend/components/CellInput/pluto_autocomplete.js

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -51,18 +51,9 @@ let open_docs_if_autocomplete_is_open_command = (cm) => {
5151
return false
5252
}
5353

54-
/** @param {EditorView} cm */
55-
let complete_and_also_type = (cm) => {
56-
// Possibly autocomplete
57-
acceptCompletion(cm)
58-
// And then do nothing, in the hopes that codemirror will add whatever we typed
59-
return false
60-
}
61-
6254
const pluto_autocomplete_keymap = [
6355
{ key: "Tab", run: tab_completion_command },
6456
{ key: "?", run: open_docs_if_autocomplete_is_open_command },
65-
{ key: ".", run: complete_and_also_type },
6657
]
6758

6859
/**
@@ -151,12 +142,7 @@ const section_operators = {
151142
const field_rank_heuristic = (text, is_exported) => is_exported * 3 + (/^\p{Ll}/u.test(text) ? 2 : /^\p{Lu}/u.test(text) ? 1 : 0)
152143

153144
const julia_commit_characters = (/** @type {autocomplete.CompletionContext} */ ctx) => {
154-
// const output = [".", "[", "{"]
155-
156-
// if (ctx.matchBefore(/\(.*/)) output.push(",")
157-
158-
// only the dot ".", which is handled by complete_and_also_type
159-
return undefined
145+
return ["."]
160146
}
161147
const endswith_keyword_regex =
162148
/^(.*\s)?(baremodule|begin|break|catch|const|continue|do|else|elseif|end|export|false|finally|for|function|global|if|import|let|local|macro|module|quote|return|struct|true|try|using|while)$/
@@ -245,6 +231,7 @@ const julia_code_completions_to_cm =
245231
boost:
246232
completion_type === "keyword_argument" ? 7 : is_field_expression ? field_rank_heuristic(text_to_apply, is_exported) : undefined,
247233
// boost: 50 - i / results.length,
234+
commitCharacters: completion_type === "keyword_argument" || value_type === "Macro" ? [] : undefined,
248235
}
249236
}),
250237
// This is a small thing that I really want:

0 commit comments

Comments
 (0)