mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 18:12:29 +08:00
feat(code): integrate indentation markers
This commit is contained in:
parent
3ace3d9ed9
commit
28aaa28ce5
@ -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.
|
||||
|
||||
|
@ -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",
|
||||
|
@ -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
591
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user