Add option to turn it on/off
This commit is contained in:
@ -37,7 +37,7 @@ import { inlineHoveringTips } from "./documentation/inlineHelp";
|
||||
import { toposCompletions } from "./documentation/inlineHelp";
|
||||
import { javascriptLanguage } from "@codemirror/lang-javascript"
|
||||
|
||||
const jsCompletions = javascriptLanguage.data.of({
|
||||
export const jsCompletions = javascriptLanguage.data.of({
|
||||
autocomplete: toposCompletions
|
||||
})
|
||||
|
||||
@ -53,7 +53,6 @@ export const editorSetup: Extension = (() => [
|
||||
bracketMatching(),
|
||||
closeBrackets(),
|
||||
autocompletion(),
|
||||
jsCompletions,
|
||||
highlightActiveLine(),
|
||||
highlightSelectionMatches(),
|
||||
keymap.of([
|
||||
@ -67,6 +66,7 @@ export const editorSetup: Extension = (() => [
|
||||
export const installEditor = (app: Editor) => {
|
||||
app.vimModeCompartment = new Compartment();
|
||||
app.hoveringCompartment = new Compartment();
|
||||
app.completionsCompartment = new Compartment();
|
||||
app.withLineNumbers = new Compartment();
|
||||
app.chosenLanguage = new Compartment();
|
||||
app.fontSize = new Compartment();
|
||||
@ -91,6 +91,7 @@ export const installEditor = (app: Editor) => {
|
||||
app.withLineNumbers.of(lines),
|
||||
app.fontSize.of(fontModif),
|
||||
app.hoveringCompartment.of(app.settings.tips ? inlineHoveringTips : []),
|
||||
app.completionsCompartment.of(app.settings.completions ? jsCompletions : []),
|
||||
editorSetup,
|
||||
toposTheme,
|
||||
app.chosenLanguage.of(javascript()),
|
||||
|
||||
Reference in New Issue
Block a user