Skip to content

Commit 8474032

Browse files
committed
feat: CodeMirror - add indentation markers extension
1 parent d13f447 commit 8474032

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

package-lock.json

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@
103103
"@codemirror/legacy-modes": "6.4.2",
104104
"@codemirror/lint": "6.8.4",
105105
"@codemirror/search": "6.5.8",
106+
"@replit/codemirror-indentation-markers": "6.5.3",
106107
"@replit/codemirror-vscode-keymap": "6.0.2",
107108
"@types/react-dates": "^21.8.6",
108109
"@uiw/codemirror-theme-github": "^4.23.7",
@@ -118,11 +119,11 @@
118119
"react-codemirror-merge": "4.23.6",
119120
"react-dates": "^21.8.0",
120121
"react-diff-viewer-continued": "^3.4.0",
122+
"react-draggable": "^4.4.5",
121123
"react-monaco-editor": "^0.54.0",
122124
"react-virtualized-sticky-tree": "^3.0.0-beta18",
123125
"sass": "^1.69.7",
124-
"tslib": "2.7.0",
125-
"react-draggable": "^4.4.5"
126+
"tslib": "2.7.0"
126127
},
127128
"overrides": {
128129
"cross-spawn": "^7.0.5",

src/Common/CodeMirror/CodeEditor.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import { foldGutter } from '@codemirror/language'
2727
import { search } from '@codemirror/search'
2828
import { lintGutter } from '@codemirror/lint'
2929
import { vscodeKeymap } from '@replit/codemirror-vscode-keymap'
30+
import { indentationMarkers } from '@replit/codemirror-indentation-markers'
3031

3132
import { AppThemeType, useTheme } from '@Shared/Providers'
3233
import { getUniqueId } from '@Shared/Helpers'
@@ -196,6 +197,7 @@ const CodeEditor = <DiffView extends boolean = false>({
196197
const baseExtensions: Extension[] = [
197198
basicSetup(basicSetupOptions),
198199
keymap.of(vscodeKeymap.filter(({ key }) => !disableSearch || key !== 'Mod-f')),
200+
indentationMarkers(),
199201
getLanguageExtension(mode),
200202
foldingCompartment.of(foldConfig),
201203
lintGutter(),

0 commit comments

Comments
 (0)