Skip to content

Commit

Permalink
💄 cursor color
Browse files Browse the repository at this point in the history
  • Loading branch information
JiangWeixian committed May 18, 2024
1 parent 6d0d2c9 commit d2f1853
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/client/src/components/editor/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ import type { KeyBinding } from '@codemirror/view'
import type { Accessor, Component } from 'solid-js'
import type { Files } from './extensions/autocompletion/tsserver.worker'

const theme = EditorView.theme({
'.cm-content': {
caretColor: '#0e9',
},
'.cm-cursor': {
borderLeftColor: '#0e9',
},
}, { dark: true })

export type Decorators = Array<{
className?: string
line: number
Expand Down Expand Up @@ -200,6 +209,7 @@ export const CodeMirror: Component<CodeMirrorProps>
]

const extensionList = () => [
theme,
highlightSpecialChars(),
history(),
closeBrackets(),
Expand Down

0 comments on commit d2f1853

Please sign in to comment.