Skip to content

Commit

Permalink
whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
fonsp committed Jul 15, 2024
1 parent 875d477 commit 8fd59bd
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions frontend/components/CellInput/pluto_autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,10 @@ const julia_code_completions_to_cm =

options: [
...results
.filter(([text, _1, _2, is_from_notebook, completion_type]) => (ctx.explicit || completion_type != "path") && !(is_from_notebook && is_already_a_global(text)))
.filter(
([text, _1, _2, is_from_notebook, completion_type]) =>
(ctx.explicit || completion_type != "path") && !(is_from_notebook && is_already_a_global(text))
)
.map(([text, value_type, is_exported, is_from_notebook, completion_type, _ignored], i) => {
// (quick) fix for identifiers that need to be escaped
// Ideally this is done with Meta.isoperator on the julia side
Expand Down Expand Up @@ -392,7 +395,7 @@ const special_emoji_examples = ["🐶", "🐱", "🐭", "🐰", "🐼", "🐨",
const apply_completion = (view, completion, from, to) => {
const currentComp = view.state.sliceDoc(from, to)

let insert = completion.detail ?? completion.label;
let insert = completion.detail ?? completion.label
const is_emoji = completion.label.startsWith("\\:")
if (!is_emoji && currentComp !== completion.label) {
const is_inside_string = match_string_complete(view.state, to)
Expand All @@ -401,7 +404,7 @@ const apply_completion = (view, completion, from, to) => {
}
}

view.dispatch({ changes: {from, to, insert}, annotations: autocomplete.pickedCompletion.of(completion), })
view.dispatch({ changes: { from, to, insert }, annotations: autocomplete.pickedCompletion.of(completion) })
}

const special_symbols_completion = (/** @type {() => Promise<SpecialSymbols?>} */ request_special_symbols) => {
Expand Down

0 comments on commit 8fd59bd

Please sign in to comment.