File tree Expand file tree Collapse file tree 1 file changed +18
-3
lines changed
Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Original file line number Diff line number Diff line change 1- import { EditorView , highlightActiveLine , showPanel } from '@codemirror/view'
1+ import { foldGutter , toggleFold } from '@codemirror/language'
2+ import {
3+ EditorView ,
4+ highlightActiveLine ,
5+ keymap ,
6+ showPanel ,
7+ } from '@codemirror/view'
28import { org } from '@orgajs/cm-lang'
3- import theme from './theme.js'
49import { cleanupPlugin } from './plugins/cleanup.js'
10+ import theme from './theme.js'
511
612/**
7- * @returns {import('@codemirror/view').Panel') }
13+ * @returns {import('@codemirror/view').Panel }
814 */
915function footer ( ) {
1016 const dom = document . createElement ( 'div' )
@@ -17,11 +23,20 @@ function footer() {
1723 }
1824}
1925
26+ const keys = [
27+ {
28+ key : 'Tab' ,
29+ run : toggleFold ,
30+ } ,
31+ ]
32+
2033export const setup = ( ( ) => [
2134 highlightActiveLine ( ) ,
35+ foldGutter ( ) ,
2236 org ( ) ,
2337 theme ,
2438 EditorView . lineWrapping ,
2539 cleanupPlugin ,
2640 showPanel . of ( footer ) ,
41+ keymap . of ( keys ) ,
2742] ) ( )
You can’t perform that action at this time.
0 commit comments