mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-12-23 00:32:11 +00:00
Revert "fix(codemirror): remove defect language highlighting"
This reverts commit 6e36ab56b7
.
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
7050d7d5ed
commit
72a211b58f
1 changed files with 7 additions and 0 deletions
|
@ -9,6 +9,7 @@ import { useMayEdit } from '../../../hooks/common/use-may-edit'
|
|||
import { useTranslatedText } from '../../../hooks/common/use-translated-text'
|
||||
import { useDarkModeState } from '../../../hooks/dark-mode/use-dark-mode-state'
|
||||
import { cypressAttribute, cypressId } from '../../../utils/cypress-attribute'
|
||||
import { findLanguageByCodeBlockName } from '../../markdown-renderer/extensions/_base-classes/code-block-markdown-extension/find-language-by-code-block-name'
|
||||
import type { ScrollProps } from '../synced-scroll/scroll-props'
|
||||
import styles from './extended-codemirror/codemirror.module.scss'
|
||||
import { useCodeMirrorAutocompletionsExtension } from './hooks/codemirror-extensions/use-code-mirror-autocompletions-extension'
|
||||
|
@ -36,6 +37,8 @@ import { useLinter } from './linter/linter'
|
|||
import { MaxLengthWarning } from './max-length-warning/max-length-warning'
|
||||
import { StatusBar } from './status-bar/status-bar'
|
||||
import { ToolBar } from './tool-bar/tool-bar'
|
||||
import { markdown, markdownLanguage } from '@codemirror/lang-markdown'
|
||||
import { languages } from '@codemirror/language-data'
|
||||
import { lintGutter } from '@codemirror/lint'
|
||||
import { oneDark } from '@codemirror/theme-one-dark'
|
||||
import ReactCodeMirror from '@uiw/react-codemirror'
|
||||
|
@ -91,6 +94,10 @@ export const EditorPane: React.FC<EditorPaneProps> = ({ scrollState, onScroll, o
|
|||
() => [
|
||||
linterExtension,
|
||||
lintGutter(),
|
||||
markdown({
|
||||
base: markdownLanguage,
|
||||
codeLanguages: (input) => findLanguageByCodeBlockName(languages, input)
|
||||
}),
|
||||
remoteCursorsExtension,
|
||||
lineWrappingExtension,
|
||||
editorScrollExtension,
|
||||
|
|
Loading…
Reference in a new issue