@codemirror/lang-python
6.2.1 • Public • Published[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.
import{EditorView,basicSetup}from"codemirror"import{python}from"@codemirror/lang-python"constview=newEditorView({parent:document.body,doc:`print("Hello world")`,extensions:[basicSetup,python()]})
python() → LanguageSupportPython language support.
pythonLanguage:LRLanguageA language provider based on theLezer Pythonparser, extended withhighlighting and indentation information.
globalCompletion:CompletionSourceAutocompletion for built-in Python globals and keywords.
localCompletionSource(context: CompletionContext) → CompletionResult |nullCompletion source that looks up locally defined names inPython code.
Package Sidebar
Install
npm i @codemirror/lang-python
Repository
Weekly Downloads
902,410
Version
6.2.1
License
MIT
Unpacked Size
37 kB
Total Files
9