mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-09-24 05:21:34 +08:00
chore(code): introduce fold gutter
This commit is contained in:
parent
9b958fc659
commit
9bbe111dd9
@ -1,6 +1,6 @@
|
|||||||
import { defaultKeymap, history, historyKeymap, indentWithTab } from "@codemirror/commands";
|
import { defaultKeymap, history, historyKeymap, indentWithTab } from "@codemirror/commands";
|
||||||
import { EditorView, highlightActiveLine, keymap, lineNumbers, placeholder, ViewUpdate, type EditorViewConfig } from "@codemirror/view";
|
import { EditorView, highlightActiveLine, keymap, lineNumbers, placeholder, ViewUpdate, type EditorViewConfig } from "@codemirror/view";
|
||||||
import { defaultHighlightStyle, StreamLanguage, syntaxHighlighting, indentUnit, bracketMatching } from "@codemirror/language";
|
import { defaultHighlightStyle, StreamLanguage, syntaxHighlighting, indentUnit, bracketMatching, foldGutter } from "@codemirror/language";
|
||||||
import { Compartment, type Extension } from "@codemirror/state";
|
import { Compartment, type Extension } from "@codemirror/state";
|
||||||
import { highlightSelectionMatches } from "@codemirror/search";
|
import { highlightSelectionMatches } from "@codemirror/search";
|
||||||
import { vim } from "@replit/codemirror-vim";
|
import { vim } from "@replit/codemirror-vim";
|
||||||
@ -40,6 +40,7 @@ export default class CodeMirror extends EditorView {
|
|||||||
highlightSelectionMatches(),
|
highlightSelectionMatches(),
|
||||||
bracketMatching(),
|
bracketMatching(),
|
||||||
lineNumbers(),
|
lineNumbers(),
|
||||||
|
foldGutter(),
|
||||||
indentUnit.of(" ".repeat(4)),
|
indentUnit.of(" ".repeat(4)),
|
||||||
keymap.of([
|
keymap.of([
|
||||||
...defaultKeymap,
|
...defaultKeymap,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user