mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 19:05:59 +01:00
chore(code): reintroduce highlight active line & selection
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
"dependencies": {
|
||||
"@codemirror/commands": "6.8.1",
|
||||
"@codemirror/legacy-modes": "6.5.1",
|
||||
"@codemirror/search": "6.5.10",
|
||||
"@codemirror/view": "6.36.7",
|
||||
"codemirror-lang-hcl": "0.1.0"
|
||||
}
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { defaultKeymap, indentWithTab } from "@codemirror/commands";
|
||||
import { EditorView, 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 } from "@codemirror/language";
|
||||
import { Compartment } from "@codemirror/state";
|
||||
import { highlightSelectionMatches } from "@codemirror/search";
|
||||
import byMimeType from "./syntax_highlighting.js";
|
||||
|
||||
type ContentChangedListener = () => void;
|
||||
@@ -26,6 +27,8 @@ export default class CodeMirror extends EditorView {
|
||||
]),
|
||||
languageCompartment.of([]),
|
||||
syntaxHighlighting(defaultHighlightStyle),
|
||||
highlightActiveLine(),
|
||||
highlightSelectionMatches(),
|
||||
lineNumbers(),
|
||||
indentUnit.of(" ".repeat(4))
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user