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-dialog",
"thiserror 2.0.17",
"tokio",
"ts-rs",
"yaak-common",
]

View File

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

View File

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

View File

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