@replit/codemirror-emacs
Advanced tools
Comparing version 0.20.0 to 6.0.0
@@ -1,3 +0,3 @@ | ||
import { basicSetup, EditorState } from '@codemirror/basic-setup'; | ||
import { EditorView, highlightActiveLine } from '@codemirror/view'; | ||
import { basicSetup, EditorView } from 'codemirror'; | ||
import { highlightActiveLine } from '@codemirror/view'; | ||
import { javascript } from '@codemirror/lang-javascript'; | ||
@@ -11,4 +11,3 @@ import { xml } from '@codemirror/lang-xml'; | ||
const doc = ` | ||
import { basicSetup, EditorState } from '@codemirror/basic-setup'; | ||
import { EditorView } from '@codemirror/view'; | ||
import { basicSetup, EditorView } from 'codemirror'; | ||
import { javascript } from '@codemirror/lang-javascript'; | ||
@@ -22,6 +21,4 @@ import { emacs } from "../src/" | ||
new EditorView({ | ||
state: EditorState.create({ | ||
doc, | ||
extensions: [emacs(), basicSetup, javascript()], | ||
}), | ||
doc, | ||
extensions: [emacs(), basicSetup, javascript()], | ||
parent: document.querySelector('#editor'), | ||
@@ -50,12 +47,10 @@ }); | ||
view = (window as any)._view = new EditorView({ | ||
state: EditorState.create({ | ||
doc: htmlCheckbox.checked ? document.documentElement.outerHTML : doc, | ||
extensions: [ | ||
emacs(), | ||
basicSetup, | ||
htmlCheckbox.checked ? xml(): javascript(), | ||
highlightActiveLine(), | ||
wrapCheckbox.checked && EditorView.lineWrapping, | ||
].filter(Boolean), | ||
}), | ||
doc: htmlCheckbox.checked ? document.documentElement.outerHTML : doc, | ||
extensions: [ | ||
emacs(), | ||
basicSetup, | ||
htmlCheckbox.checked ? xml(): javascript(), | ||
highlightActiveLine(), | ||
wrapCheckbox.checked && EditorView.lineWrapping, | ||
].filter(Boolean), | ||
parent: document.querySelector('#editor'), | ||
@@ -62,0 +57,0 @@ }); |
{ | ||
"name": "@replit/codemirror-emacs", | ||
"version": "0.20.0", | ||
"version": "6.0.0", | ||
"description": "Emacs keybindings for CodeMirror 6", | ||
@@ -26,14 +26,14 @@ "scripts": { | ||
"peerDependencies": { | ||
"@codemirror/state": "^0.20.0", | ||
"@codemirror/view": "^0.20.1", | ||
"@codemirror/commands": "^0.20.0", | ||
"@codemirror/autocomplete": "^0.20.0", | ||
"@codemirror/search": "^0.20.0" | ||
"@codemirror/state": "^6.0.1", | ||
"@codemirror/view": "^6.0.2", | ||
"@codemirror/commands": "^6.0.0", | ||
"@codemirror/autocomplete": "^6.0.2", | ||
"@codemirror/search": "^6.0.0" | ||
}, | ||
"devDependencies": { | ||
"@codemirror/buildhelper": "^0.1.15", | ||
"@codemirror/language": "^0.20.0", | ||
"@codemirror/basic-setup": "^0.20.0", | ||
"@codemirror/lang-javascript": "^0.20.0", | ||
"@codemirror/lang-xml": "^0.20.0", | ||
"codemirror": "6.0.0", | ||
"@codemirror/buildhelper": "^0.1.16", | ||
"@codemirror/language": "^6.1.0", | ||
"@codemirror/lang-javascript": "^6.0.0", | ||
"@codemirror/lang-xml": "^6.0.0", | ||
"vite": "^2.3.8" | ||
@@ -40,0 +40,0 @@ }, |
@@ -13,18 +13,15 @@ # Emacs keybindings for CM6 | ||
```js | ||
import { basicSetup, EditorState } from '@codemirror/basic-setup'; | ||
import { EditorView } from '@codemirror/view'; | ||
import { basicSetup, EditorView } from 'codemirror'; | ||
import { emacs } from "@replit/codemirror-emacs" | ||
new EditorView({ | ||
state: EditorState.create({ | ||
doc: "", | ||
extensions: [ | ||
// make sure emacs is included before other keymaps | ||
emacs(), | ||
// include the default keymap and all other keymaps you want to use in insert mode | ||
basicSetup, | ||
] | ||
}), | ||
parent: document.querySelector('#editor'), | ||
doc: "", | ||
extensions: [ | ||
// make sure emacs is included before other keymaps | ||
emacs(), | ||
// include the default keymap and all other keymaps you want to use in insert mode | ||
basicSetup, | ||
], | ||
parent: document.querySelector('#editor'), | ||
}) | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1
79153
1871
27