Skip to content

Commit

Permalink
chore(editor): extensions无需展开
Browse files Browse the repository at this point in the history
  • Loading branch information
ZvonimirSun committed Dec 19, 2023
1 parent cd54bea commit 1a01f96
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/components/editor/Editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ const hasRedo = ref(false)
onMounted(() => {
const extensions = [
...basic.extensions,
...props.plugin?.extensions || [],
basic.extensions,
props.plugin?.extensions || [],
EditorView.updateListener.of(onChange),
themeCompartment.of(useStyleStore().isDark ? oneDarkTheme : EditorView.theme({}, { dark: false })),
hightLightCompartment.of(useStyleStore().isDark ? syntaxHighlighting(oneDarkHighlightStyle, { fallback: true }) : syntaxHighlighting(defaultHighlightStyle))
Expand Down
4 changes: 2 additions & 2 deletions src/components/editor/EditorMini.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ const hightLightCompartment = new Compartment()
onMounted(() => {
const extensions = [
...mini.extensions,
...props.plugin ? props.plugin.miniExtensions || props.plugin.extensions : [],
mini.extensions,
props.plugin ? props.plugin.miniExtensions || props.plugin.extensions : [],
EditorView.updateListener.of(onChange),
themeCompartment.of(useStyleStore().isDark ? oneDarkTheme : EditorView.theme({}, { dark: false })),
hightLightCompartment.of(useStyleStore().isDark ? syntaxHighlighting(oneDarkHighlightStyle, { fallback: true }) : syntaxHighlighting(defaultHighlightStyle))
Expand Down
2 changes: 1 addition & 1 deletion src/components/editor/lang-basic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function baseInfoPanel (view: EditorView): Panel {
const plugin: EditorPlugin = {
...mini,
extensions: [
...mini.extensions,
mini.extensions,
showPanel.of(baseInfoPanel),
lintGutter()
]
Expand Down

0 comments on commit 1a01f96

Please sign in to comment.