python3-language-server

0.0.1-beta.1 • Public • Published

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]
});

Other language servers

Package Sidebar

Install

npm i python3-language-server

Weekly Downloads

1

Version

0.0.1-beta.1

License

MIT

Unpacked Size

4.07 MB

Total Files

4

Last publish

Collaborators

  • junhany