feat(code): integrate indentation markers

This commit is contained in:
Elian Doran 2025-05-13 14:32:50 +03:00
parent 3ace3d9ed9
commit 28aaa28ce5
No known key found for this signature in database
4 changed files with 301 additions and 294 deletions

View File

@ -33,6 +33,7 @@
* Code notes:
* Added the GDScript (Godot) language.
* Added the Nix language (and also in code blocks for text notes).
* Added an indentation marker.
* Mermaid diagrams: basic syntax highlight (not all diagram types are supported) and code folding.
* Slight organization in Appearance settings: code block themes are now in "Text Notes", added a "Related settings" section in Appearance.

View File

@ -54,6 +54,7 @@
"@fsegurai/codemirror-theme-volcano": "6.1.4",
"@fsegurai/codemirror-theme-vscode-dark": "6.1.4",
"@fsegurai/codemirror-theme-vscode-light": "6.1.4",
"@replit/codemirror-indentation-markers": "6.5.3",
"@replit/codemirror-lang-nix": "6.0.1",
"@replit/codemirror-vim": "6.3.0",
"@ssddanbrown/codemirror-lang-smarty": "1.0.0",

View File

@ -4,6 +4,7 @@ import { defaultHighlightStyle, StreamLanguage, syntaxHighlighting, indentUnit,
import { Compartment, EditorSelection, EditorState, type Extension } from "@codemirror/state";
import { highlightSelectionMatches } from "@codemirror/search";
import { vim } from "@replit/codemirror-vim";
import { indentationMarkers } from "@replit/codemirror-indentation-markers";
import byMimeType from "./syntax_highlighting.js";
import smartIndentWithTab from "./extensions/custom_tab.js";
import type { ThemeDefinition } from "./color_themes.js";
@ -62,6 +63,7 @@ export default class CodeMirror extends EditorView {
bracketMatching(),
lineNumbers(),
foldGutter(),
indentationMarkers(),
indentUnit.of(" ".repeat(4)),
keymap.of([
...defaultKeymap,

591
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff