File tree Expand file tree Collapse file tree 2 files changed +20
-5
lines changed
src/markup/codemirror/search-plugin Expand file tree Collapse file tree 2 files changed +20
-5
lines changed Original file line number Diff line number Diff line change @@ -19,15 +19,17 @@ import {
1919 keymap ,
2020} from '@codemirror/view' ;
2121
22+ import type { MarkdownEditorMode } from 'src/bundle' ;
23+ import type { EventMap } from 'src/bundle/Editor' ;
24+ import type { RendererItem } from 'src/extensions' ;
25+ import { debounce } from 'src/lodash' ;
2226import { renderSearchPopup } from 'src/modules/search' ;
27+ import type { Receiver } from 'src/utils' ;
2328
24- import type { MarkdownEditorMode } from '../../../bundle' ;
25- import type { EventMap } from '../../../bundle/Editor' ;
26- import type { RendererItem } from '../../../extensions' ;
27- import { debounce } from '../../../lodash' ;
28- import type { Receiver } from '../../../utils' ;
2929import { ReactRendererFacet } from '../react-facet' ;
3030
31+ import { searchTheme } from './theme' ;
32+
3133type SearchQueryConfig = ConstructorParameters < typeof SearchQuery > [ 0 ] ;
3234
3335const INPUT_DELAY = 200 ;
@@ -165,6 +167,7 @@ export const SearchPanelPlugin = (params: SearchPanelPluginParams) =>
165167 {
166168 provide : ( ) => [
167169 keymap . of ( searchKeymap ) ,
170+ searchTheme ,
168171 search ( {
169172 createPanel : ( ) => ( {
170173 // Create an empty search panel
Original file line number Diff line number Diff line change 1+ import { EditorView } from '#cm/view' ;
2+
3+ export const searchTheme = EditorView . baseTheme ( {
4+ '&light, &dark' : {
5+ '& .cm-searchMatch' : {
6+ backgroundColor : 'var(--g-color-base-info-light)' ,
7+ } ,
8+ '& .cm-searchMatch-selected' : {
9+ backgroundColor : 'var(--g-color-base-info-heavy)' ,
10+ } ,
11+ } ,
12+ } ) ;
You can’t perform that action at this time.
0 commit comments