python3-language-server
v0.0.1-beta.1
Published
A Python 3 language server in a web extension.
Downloads
7
Maintainers
Readme
Python3 LSP language server web extension
A Python 3 LSP server that runs in a web extension/WebWorker.
Functionality
The ANTLR4 grammar for Python 3 is based on version 3.6 of The Python Language Reference. Credits to antlr/grammars-v4 for their g4 grammar base files and examples.
This Language Server runs syntax validation while the textDocument's content is changing (turned off by default). In addition, it supports LSP capabilities including:
- Auto-completion
- Custom commands:
- extension.mySql.validationOn: used to turn on/off syntax validation in language server.
Usage
The package exports a worker JS file named "python3-server-worker". To run in a browser env, such as monaco-editor
,
please use it to create a Worker
instance with the help of monaco-languageclient
.
Use sendRequest
API to execute custom commands:
languageClient.sendRequest(ExecuteCommandRequest.type, {
command: "extension.python3.validationOn",
arguments: [true]
});