codemirror-foldable-indentation-guides 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dev/index.ts +7 -6
- package/package.json +1 -1
- package/public/example.png +0 -0
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ Utilizes [@replit/codemirror-indentation-markers](https://github.com/replit/code
|
|
|
13
13
|
import { basicSetup } from 'codemirror';
|
|
14
14
|
import { EditorState } from '@codemirror/state';
|
|
15
15
|
import { EditorView } from '@codemirror/view';
|
|
16
|
-
import {
|
|
16
|
+
import { foldableIndentationGuides } from 'codemirror-foldable-indentation-guides';
|
|
17
17
|
|
|
18
18
|
const doc = `
|
|
19
19
|
def max(a, b):
|
|
@@ -26,7 +26,7 @@ def max(a, b):
|
|
|
26
26
|
new EditorView({
|
|
27
27
|
state: EditorState.create({
|
|
28
28
|
doc,
|
|
29
|
-
extensions: [basicSetup,
|
|
29
|
+
extensions: [basicSetup, foldableIndentationGuides()],
|
|
30
30
|
}),
|
|
31
31
|
parent: document.querySelector('#editor'),
|
|
32
32
|
});
|
|
@@ -34,7 +34,7 @@ new EditorView({
|
|
|
34
34
|
|
|
35
35
|
### Options
|
|
36
36
|
|
|
37
|
-
You can provide an options object to `
|
|
37
|
+
You can provide an options object to `foldableIndentationGuides()` with the following
|
|
38
38
|
optional properties:
|
|
39
39
|
|
|
40
40
|
- `highlightActiveMarker`
|
|
@@ -141,7 +141,7 @@ new EditorView({
|
|
|
141
141
|
doc,
|
|
142
142
|
extensions: [
|
|
143
143
|
basicSetup,
|
|
144
|
-
|
|
144
|
+
foldableIndentationGuides({
|
|
145
145
|
highlightActiveBlock: false,
|
|
146
146
|
hideFirstIndent: true,
|
|
147
147
|
markerType: 'codeOnly',
|
package/dev/index.ts
CHANGED
|
@@ -180,14 +180,14 @@ const indentConf = new Compartment();
|
|
|
180
180
|
|
|
181
181
|
const view = new EditorView({
|
|
182
182
|
state: EditorState.create({
|
|
183
|
-
doc:
|
|
183
|
+
doc: jsDoc,
|
|
184
184
|
extensions: [
|
|
185
185
|
basicSetup,
|
|
186
|
-
cpp(),
|
|
186
|
+
// cpp(),
|
|
187
187
|
// css(),
|
|
188
188
|
// html(),
|
|
189
189
|
// python(),
|
|
190
|
-
|
|
190
|
+
javascript(),
|
|
191
191
|
indentConf.of(indentUnit.of(' ')),
|
|
192
192
|
foldableIndentationGuides({
|
|
193
193
|
additionalPadding: 4,
|
|
@@ -196,10 +196,11 @@ const view = new EditorView({
|
|
|
196
196
|
highlightHoveredBlockBackground: true,
|
|
197
197
|
highlightHoveredMarker: true,
|
|
198
198
|
colors: {
|
|
199
|
-
activeLight: '
|
|
200
|
-
light: '#
|
|
199
|
+
activeLight: '#7f7f7f',
|
|
200
|
+
light: '#d0d0d0',
|
|
201
|
+
hoverLight: '#7f7f7f',
|
|
201
202
|
backgroundLight: '#4385c720',
|
|
202
|
-
backgroundHoverLight: '#
|
|
203
|
+
backgroundHoverLight: '#43adc720',
|
|
203
204
|
},
|
|
204
205
|
}),
|
|
205
206
|
],
|
package/package.json
CHANGED
package/public/example.png
CHANGED
|
Binary file
|