mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-14 07:08:30 +00:00
autocompletion: lint
This commit is contained in:
parent
2d2d0cabb3
commit
8e6909478c
@ -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>
|
||||
|
||||
@ -364,14 +364,7 @@ const fontFamilyOptions = {
|
||||
};
|
||||
|
||||
function SettingsTab({ scheduler }) {
|
||||
const {
|
||||
theme,
|
||||
keybindings,
|
||||
isLineNumbersDisplayed,
|
||||
isAutoCompletionEnabled,
|
||||
fontSize,
|
||||
fontFamily
|
||||
} = useSettings();
|
||||
const { theme, keybindings, isLineNumbersDisplayed, isAutoCompletionEnabled, fontSize, fontFamily } = useSettings();
|
||||
|
||||
return (
|
||||
<div className="text-foreground p-4 space-y-4">
|
||||
|
||||
@ -105,14 +105,7 @@ export function Repl({ embedded = false }) {
|
||||
const [lastShared, setLastShared] = useState();
|
||||
const [pending, setPending] = useState(true);
|
||||
|
||||
const {
|
||||
theme,
|
||||
keybindings,
|
||||
fontSize,
|
||||
fontFamily,
|
||||
isLineNumbersDisplayed,
|
||||
isAutoCompletionEnabled
|
||||
} = useSettings();
|
||||
const { theme, keybindings, fontSize, fontFamily, isLineNumbersDisplayed, isAutoCompletionEnabled } = useSettings();
|
||||
|
||||
const { code, setCode, scheduler, evaluate, activateCode, isDirty, activeCode, pattern, started, stop, error } =
|
||||
useStrudel({
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user