Skip to content

Commit

Permalink
fix: remove basic setup
Browse files Browse the repository at this point in the history
  • Loading branch information
riccardoperra committed May 4, 2022
1 parent 5b937d5 commit 977bba8
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 11 deletions.
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@
"vite-tsconfig-paths": "^3.4.1"
},
"peerDependencies": {
"@codemirror/basic-setup": "^0.20.0",
"@codemirror/commands": "^0.20.0",
"@codemirror/state": "^0.20.0",
"@codemirror/view": "^0.20.4",
Expand All @@ -82,7 +81,6 @@
"node": ">=14"
},
"dependencies": {
"@codemirror/basic-setup": "^0.20.0",
"@codemirror/commands": "^0.20.0",
"@codemirror/state": "^0.20.0",
"@codemirror/view": "^0.20.4",
Expand Down
3 changes: 0 additions & 3 deletions src/lib/createCodeMirror.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {EditorState, SelectionRange, StateEffect} from '@codemirror/state';
import {basicSetup as defaultBasicSetup} from '@codemirror/basic-setup';
import {EditorView, keymap, placeholder as extendPlaceholder} from '@codemirror/view';
import {indentWithTab as defaultIndentWithTab} from '@codemirror/commands';
import {createEffect, createMemo, createSignal, on, onCleanup} from 'solid-js';
Expand Down Expand Up @@ -31,7 +30,6 @@ export function createCodeMirror(initialOptions: CodeMirrorOptions) {
const computedExtensions = createMemo(() => {
const {
indentWithTab,
basicSetup,
placeholder,
editable,
onUpdate,
Expand All @@ -42,7 +40,6 @@ export function createCodeMirror(initialOptions: CodeMirrorOptions) {

return [
indentWithTab ? keymap.of([defaultIndentWithTab]) : null,
basicSetup ? defaultBasicSetup : null,
placeholder && extendPlaceholder ? extendPlaceholder(placeholder) : null,
!editable ? EditorView.editable.of(false) : null,
!!onUpdate && typeof onUpdate === 'function' ? EditorView.updateListener.of(onUpdate) : null,
Expand Down
5 changes: 0 additions & 5 deletions src/lib/types/codeMirrorProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,6 @@ export interface CodeMirrorComponentProps extends Omit<EditorStateConfig, 'doc'
* Enables a placeholder—a piece of example content to show when the editor is empty.
*/
placeholder?: string | HTMLElement;
/**
* Whether to optional basicSetup by default
* @default true
*/
basicSetup?: boolean;
/**
* This disables editing of the editor content by the user.
* @default true
Expand Down
1 change: 0 additions & 1 deletion src/lib/utils/extractCodeMirrorProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ export const extractCodeMirrorProps = (
'width',
'minWidth',
'maxWidth',
'basicSetup',
'placeholder',
'editable',
'root',
Expand Down

0 comments on commit 977bba8

Please sign in to comment.