feat(editor): Mermaid syntax highlighting, linter and autocomplete
- StreamLanguage tokenizer for Mermaid: diagram-type keywords, general keywords, directions, arrows/links, strings, %% comments, init directives and YAML frontmatter, with a dark-theme HighlightStyle - live linter via mermaid.parse: maps parse errors to the right editor line (accounting for the frontmatter lines mermaid strips), with wavy underline, gutter marker and message tooltip - autocomplete: Mermaid keyword/type/direction options plus starter diagram snippets offered on the first line; bracket closing - dark-themed completion + diagnostic tooltips Adds @codemirror/lint, @codemirror/autocomplete and @lezer/highlight.
This commit is contained in:
@@ -13,10 +13,13 @@
|
||||
"app:build": "tauri build"
|
||||
},
|
||||
"dependencies": {
|
||||
"@codemirror/autocomplete": "^6.18.0",
|
||||
"@codemirror/commands": "^6.6.0",
|
||||
"@codemirror/language": "^6.10.2",
|
||||
"@codemirror/lint": "^6.8.0",
|
||||
"@codemirror/state": "^6.4.1",
|
||||
"@codemirror/view": "^6.28.0",
|
||||
"@lezer/highlight": "^1.2.0",
|
||||
"@tauri-apps/api": "^2.0.0",
|
||||
"@tauri-apps/plugin-dialog": "^2.0.0",
|
||||
"codemirror": "^6.0.1",
|
||||
|
||||
Reference in New Issue
Block a user