Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Python language support for the CodeMirror code editor

License

NotificationsYou must be signed in to change notification settings

codemirror/lang-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

98 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

[WEBSITE |ISSUES |FORUM |CHANGELOG ]

This package implements Python language support for theCodeMirror code editor.

Theproject page has more information, anumber ofexamples and thedocumentation.

This code is released under anMIT license.

We aim to be an inclusive, welcoming community. To make that explicit,we have acode ofconduct that appliesto communication around the project.

Usage

import{EditorView,basicSetup}from"codemirror"import{python}from"@codemirror/lang-python"constview=newEditorView({parent:document.body,doc:`print("Hello world")`,extensions:[basicSetup,python()]})

API Reference

python() → LanguageSupport

Python language support.

pythonLanguage:LRLanguage

A language provider based on theLezer Pythonparser, extended withhighlighting and indentation information.

globalCompletion:CompletionSource

Autocompletion for built-in Python globals and keywords.

localCompletionSource(contextCompletionContext) → CompletionResult |null

Completion source that looks up locally defined names inPython code.


[8]ページ先頭

©2009-2025 Movatter.jp