File tree Expand file tree Collapse file tree 2 files changed +22
-1
lines changed
Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change 1+ import { type Extension } from "@codemirror/state" ;
12import {
23 MarkdownView ,
34 Notice ,
@@ -69,6 +70,7 @@ import { createGetTasksApi } from "./tasks-plugin";
6970import type { ObsidianContext , OnUpdateFn , PointerDateTime } from "./types" ;
7071import { askForConfirmation } from "./ui/confirmation-modal" ;
7172import { createEditorMenuCallback } from "./ui/editor-menu" ;
73+ import { hoverPlugin } from "./ui/gutter-plugin" ;
7274import { useDateRanges } from "./ui/hooks/use-date-ranges" ;
7375import { useDebounceWithDelay } from "./ui/hooks/use-debounce-with-delay" ;
7476import { mountStatusBarWidget } from "./ui/hooks/use-status-bar-widget" ;
@@ -94,6 +96,7 @@ export default class DayPlanner extends Plugin {
9496 private sTaskEditor ! : STaskEditor ;
9597 private vaultFacade ! : VaultFacade ;
9698 private transactionWriter ! : TransactionWriter ;
99+ private extensions : Extension [ ] = [ ] ;
97100
98101 async onload ( ) {
99102 const initialPluginData : PluginData = {
@@ -183,6 +186,13 @@ export default class DayPlanner extends Plugin {
183186
184187 await this . handleNewPluginVersion ( ) ;
185188 await this . initTimelineLeafSilently ( ) ;
189+
190+ this . registerEditorExtension ( [
191+ hoverPlugin ( {
192+ onpointerup : ( ) => { } ,
193+ markerPredicate : ( ) => true ,
194+ } ) ,
195+ ] ) ;
186196 }
187197
188198 async onunload ( ) {
Original file line number Diff line number Diff line change @@ -73,7 +73,18 @@ export default defineConfig((env) => ({
7373 return assetInfo . name ;
7474 } ,
7575 } ,
76- external : [ "obsidian" , "electron" ] ,
76+ external : [
77+ "obsidian" ,
78+ "electron" ,
79+ "@codemirror/autocomplete" ,
80+ "@codemirror/collab" ,
81+ "@codemirror/commands" ,
82+ "@codemirror/language" ,
83+ "@codemirror/lint" ,
84+ "@codemirror/search" ,
85+ "@codemirror/state" ,
86+ "@codemirror/view" ,
87+ ] ,
7788 } ,
7889 } ,
7990 test : {
You can’t perform that action at this time.
0 commit comments