Skip to content

Commit c3819aa

Browse files
committed
Add python language support in CodeMirror (temp hardcode)
1 parent bb43154 commit c3819aa

File tree

4 files changed

+29
-1
lines changed

4 files changed

+29
-1
lines changed

components/views/code-editor-view.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import {
1414
useState,
1515
} from "react";
1616
import { javascript } from "@codemirror/lang-javascript";
17+
import { python } from "@codemirror/lang-python";
1718
import ViewLayout from "./layout";
1819
import { vscodeDark, vscodeLight } from "@uiw/codemirror-theme-vscode";
1920
import { useTheme } from "next-themes";
@@ -444,6 +445,7 @@ const CodeEditorView = forwardRef(
444445
onChange={onContentChange}
445446
extensions={[
446447
javascript({ jsx: true }),
448+
python(),
447449
codeInlineSuggestionExtension({
448450
delay: 1000,
449451
agent: inlineSuggestionAgentRef.current,

package-lock.json

Lines changed: 25 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: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"@capacitor/screen-orientation": "^6.0.3",
2222
"@capacitor/status-bar": "^6.0.2",
2323
"@codemirror/lang-javascript": "^6.2.2",
24+
"@codemirror/lang-python": "^6.1.6",
2425
"@langchain/anthropic": "^0.3.10",
2526
"@langchain/community": "^0.3.19",
2627
"@nextui-org/react": "^2.6.8",

vscode-extension/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"type": "git",
1010
"url": "https://github.com/Shellishack/pulse-editor"
1111
},
12-
"version": "0.0.2",
12+
"version": "0.0.3",
1313
"engines": {
1414
"vscode": "^1.95.0"
1515
},

0 commit comments

Comments
 (0)