-
-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* remove playground * [editor] bake in basic setup instead * update dependencies * add changeset
- Loading branch information
1 parent
5a1f944
commit 0f825de
Showing
19 changed files
with
1,213 additions
and
982 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
'@orgajs/cm-lang': patch | ||
'@orgajs/example-editor': patch | ||
'@orgajs/editor': patch | ||
'@orgajs/lezer': patch | ||
'website': patch | ||
--- | ||
|
||
update editor dependencies |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { foldGutter, toggleFold, bracketMatching } from '@codemirror/language' | ||
import { defaultKeymap } from '@codemirror/commands' | ||
import { EditorView, highlightActiveLine, keymap } from '@codemirror/view' | ||
import { cleanup } from './extensions/index.js' | ||
import { org } from '@orgajs/cm-lang' | ||
import theme from './theme.js' | ||
|
||
const keys = [ | ||
{ | ||
key: 'Tab', | ||
run: toggleFold, | ||
}, | ||
] | ||
|
||
export const setup = (() => [ | ||
org(), | ||
theme, | ||
keymap.of([...defaultKeymap]), | ||
highlightActiveLine(), | ||
foldGutter({ | ||
openText: '▾', | ||
closedText: '▸', | ||
}), | ||
EditorView.lineWrapping, | ||
bracketMatching(), | ||
cleanup, | ||
keymap.of([...defaultKeymap, ...keys]), | ||
])() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,8 +38,9 @@ | |
"author": "Xiaoxing Hu <[email protected]>", | ||
"license": "MIT", | ||
"dependencies": { | ||
"@codemirror/language": "^6.9.0", | ||
"@codemirror/view": "^6.17.1", | ||
"@codemirror/commands": "^6.3.0", | ||
"@codemirror/language": "^6.9.2", | ||
"@codemirror/view": "^6.22.0", | ||
"@orgajs/cm-lang": "workspace:^" | ||
}, | ||
"devDependencies": { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.