use our own input method in vscode
The lean one was annoying for \{...}
This commit is contained in:
1
playground/src/abbrev.ts
Symbolic link
1
playground/src/abbrev.ts
Symbolic link
@@ -0,0 +1 @@
|
||||
../../newt-vscode/src/abbrev.ts
|
||||
@@ -6,6 +6,7 @@ import { h, render } from "preact";
|
||||
import { ChangeEvent } from "preact/compat";
|
||||
import { archive, preload } from "./preload.ts";
|
||||
import { CompileReq, CompileRes, Message } from "./types.ts";
|
||||
import { ABBREV } from "./abbrev.ts";
|
||||
|
||||
// editor.(createModel / setModel / getModels) to switch files
|
||||
|
||||
@@ -221,17 +222,6 @@ interface EditorProps {
|
||||
initialValue: string;
|
||||
}
|
||||
|
||||
const ABBREV: Record<string, string> = {
|
||||
'\\x': '×',
|
||||
'\\r': '→',
|
||||
'\\all': '∀',
|
||||
'\\\\': '\\',
|
||||
'\\==': '≡',
|
||||
'\\circ': '∘',
|
||||
'\\1': '₁',
|
||||
'\\2': '₂',
|
||||
}
|
||||
|
||||
function Editor({ initialValue }: EditorProps) {
|
||||
const ref = useRef<HTMLDivElement>(null);
|
||||
useEffect(() => {
|
||||
|
||||
Reference in New Issue
Block a user