mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-11-29 11:42:56 +01:00
Move workspace menu, better env mgmt, QoL
This commit is contained in:
1 parent
b59ea4991c
commit
a87ca6af47
19 files changed
+214
-104
No files matched your search
@@ -41,6 +41,7 @@ export interface EditorProps {
|
||||
wrapLines?: boolean;
|
||||
format?: (v: string) => string;
|
||||
autocomplete?: GenericCompletionConfig;
|
||||
autocompleteVariables?: boolean;
|
||||
actions?: ReactNode;
|
||||
}
|
||||
|
||||
@@ -64,12 +65,14 @@ const _Editor = forwardRef<EditorView | undefined, EditorProps>(function Editor(
|
||||
singleLine,
|
||||
format,
|
||||
autocomplete,
|
||||
autocompleteVariables,
|
||||
actions,
|
||||
wrapLines,
|
||||
}: EditorProps,
|
||||
ref,
|
||||
) {
|
||||
const environment = useActiveEnvironment();
|
||||
const e = useActiveEnvironment();
|
||||
const environment = autocompleteVariables ? e : null;
|
||||
|
||||
const cm = useRef<{ view: EditorView; languageCompartment: Compartment } | null>(null);
|
||||
useImperativeHandle(ref, () => cm.current?.view);
|
||||
|
||||
@@ -37,7 +37,6 @@ import { text } from './text/extension';
|
||||
import { twig } from './twig/extension';
|
||||
import { url } from './url/extension';
|
||||
import type { Environment } from '../../../lib/models';
|
||||
import { EditorView } from 'codemirror';
|
||||
|
||||
export const myHighlightStyle = HighlightStyle.define([
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user