Add bracket matching

This commit is contained in:
Gregory Schier
2025-10-21 07:27:07 -07:00
parent 0520ef5d43
commit 5c966e5a95
4 changed files with 7 additions and 3 deletions

1
src-tauri/Cargo.lock generated
View File

@@ -8004,7 +8004,6 @@ dependencies = [
"tauri-plugin", "tauri-plugin",
"tauri-plugin-dialog", "tauri-plugin-dialog",
"thiserror 2.0.17", "thiserror 2.0.17",
"tokio",
"ts-rs", "ts-rs",
"yaak-common", "yaak-common",
] ]

View File

@@ -22,7 +22,6 @@ sha2 = { workspace = true }
tauri = { workspace = true } tauri = { workspace = true }
tauri-plugin-dialog = { workspace = true } tauri-plugin-dialog = { workspace = true }
thiserror = { workspace = true } thiserror = { workspace = true }
tokio = { workspace = true }
ts-rs = { workspace = true, features = ["chrono-impl", "serde-json-impl"] } ts-rs = { workspace = true, features = ["chrono-impl", "serde-json-impl"] }
yaak-common = { workspace = true } yaak-common = { workspace = true }

View File

@@ -19,6 +19,11 @@
@apply text-surface !important; @apply text-surface !important;
} }
/* Matching bracket */
.cm-matchingBracket {
@apply bg-transparent border-b border-b-text-subtle;
}
&:not(.cm-focused) { &:not(.cm-focused) {
.cm-cursor, .cm-fat-cursor { .cm-cursor, .cm-fat-cursor {
@apply hidden; @apply hidden;

View File

@@ -10,7 +10,7 @@ import { json } from '@codemirror/lang-json';
import { markdown } from '@codemirror/lang-markdown'; import { markdown } from '@codemirror/lang-markdown';
import { xml } from '@codemirror/lang-xml'; import { xml } from '@codemirror/lang-xml';
import type { LanguageSupport } from '@codemirror/language'; import type { LanguageSupport } from '@codemirror/language';
import { import { bracketMatching ,
codeFolding, codeFolding,
foldGutter, foldGutter,
foldKeymap, foldKeymap,
@@ -258,6 +258,7 @@ export const multiLineExtensions = ({ hideGutter }: { hideGutter?: boolean }) =>
indentOnInput(), indentOnInput(),
rectangularSelection(), rectangularSelection(),
crosshairCursor(), crosshairCursor(),
bracketMatching(),
highlightActiveLineGutter(), highlightActiveLineGutter(),
keymap.of([...searchKeymap, ...foldKeymap, ...lintKeymap]), keymap.of([...searchKeymap, ...foldKeymap, ...lintKeymap]),
]; ];