Skip to main content

Server implementation of the Language Server Protocol for reStructuredText

Project description

RST Language Server implements the server side of the Language Server Protocol (LSP) for the reStructuredText markup language.

RST Language Server is intended to be used by text editors implementing the client side of the protocol. See langserver.org for a list of implementing clients.

Features

Autocompletion of title adornments

https://raw.githubusercontent.com/digitalernachschub/rst-language-server/a4c81b4805d8ea913042c82e73eb8bae56e88c58/assets/autocomplete_title_adornments.webp

Installation

RST Language Server is available as a package on PyPI and can be installed via pip:

$ pip install --user rst-language-server

Usage with Kate

Using RST Language Server with Kate requires the LSP Client Plugin. Once the plugin is activated in the settings a new settings symbol named LSP-Client appears. Click on the section, select the User Server Settings tab and paste the following server configuration.

{
    "servers": {
        "rst": {
            "command": ["rst-ls"],
            "highlightingModeRegex": "^reStructuredText$"
        }
    }
}

This will start RST Language Server when opening any file that is configured to use the reStructuredText syntax highlighting.

Is my editor supported?

RST Language Server can be used with any text editor that implements a Language Client. See this list of Language Client implementations.

Development configuration with Kate

The RST Language Server is executed as a subprocess of the Language Client. Therefore, if we want to see log output in Kate we need to write the logs to a file using the –log-file command line option. We also set the log level to debug in order to view the JSON-RPC messages exchanged between client and server. Lastly, we configure the root (i.e. the working directory of the executed command) to the directory where our source code lives in and use poetry run to execute the code in the Git repository:

{
    "servers": {
        "rst": {
            "command": ["poetry", "run", "rst-ls", "--log-file=/tmp/rst-ls.log", "--log-level=debug"],
            "root": "/path/to/rst-language-server-repo",
            "highlightingModeRegex": "^reStructuredText$"
        }
    }
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rst-language-server-0.1.0.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

rst_language_server-0.1.0-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file rst-language-server-0.1.0.tar.gz.

File metadata

  • Download URL: rst-language-server-0.1.0.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for rst-language-server-0.1.0.tar.gz
Algorithm Hash digest
SHA256 18f81e5580313d5567ecd6b12cc9d384eae93e9b861318e65ced9e4c75fda61e
MD5 36efeb52ac3026f5dc9d912bed0fd46d
BLAKE2b-256 35d1ed97ad6c094d08d8b4402e61e7e5a64901fe0daa06e6c2bbb1f0aec24304

See more details on using hashes here.

Provenance

File details

Details for the file rst_language_server-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: rst_language_server-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for rst_language_server-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 84f7679dc424898eaaacb59d71deaa26eee54cc3766fa42d8780cbdab2543f82
MD5 aeba4ffa1b53bab295236d442c63ceaf
BLAKE2b-256 be00999e5a653a6a8df7199f98afa81be2da30a359776385c15031be0bfe9998

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page