autocompletion: lint
This commit is contained in:
parent
2d2d0cabb3
commit
8e6909478c
3 changed files with 7 additions and 20 deletions
|
|
@ -143,9 +143,10 @@ export default function CodeMirror({
|
|||
return staticExtensions;
|
||||
}, [keybindings]);
|
||||
|
||||
const setAutoCompletion = isAutoCompletionEnabled => isAutoCompletionEnabled ?
|
||||
javascriptLanguage.data.of({ autocomplete: strudelAutocomplete }) :
|
||||
autocompletion({ override: [] })
|
||||
const setAutoCompletion = (isAutoCompletionEnabled) =>
|
||||
isAutoCompletionEnabled
|
||||
? javascriptLanguage.data.of({ autocomplete: strudelAutocomplete })
|
||||
: autocompletion({ override: [] });
|
||||
|
||||
return (
|
||||
<div style={{ fontSize, fontFamily }} className="w-full">
|
||||
|
|
@ -155,7 +156,7 @@ export default function CodeMirror({
|
|||
onChange={handleOnChange}
|
||||
onCreateEditor={handleOnCreateEditor}
|
||||
onUpdate={handleOnUpdate}
|
||||
extensions={[ ...extensions, setAutoCompletion(isAutoCompletionEnabled) ]}
|
||||
extensions={[...extensions, setAutoCompletion(isAutoCompletionEnabled)]}
|
||||
basicSetup={{ lineNumbers: isLineNumbersDisplayed }}
|
||||
/>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue