Skip to main content

Slither Language Server

How to install

Run the following command from the project root directory (preferably inside a Python virtual environment):

python -m pip install .

Features

  • Go to implementations/definitions
  • Find all references
  • Show call hierarchy
  • Show type hierarchy
  • View and filter detector results

Adding new features

New request handlers should be registered in the constructor of SlitherServer. Please note that in order to keep the conceptual load to a minimum, handlers should not be declared directly in the SlitherServer class itself. Instead, related handlers should be declared in a separate module. See goto_def_impl_refs.py as an example.

The Slither Language Server uses pygls as the LSP implementation, and you should refer to its documentation when writing new handlers.

If you're adding an handler for a standard LSP feature, there will be no need to do anything on the VSCode extension side: VSCode will automatically hook its commands to use the provided feature.

If, on the other hand, the feature you're trying to add does not map to a standard LSP feature, you will need to register a custom handler. See $/slither/analyze as an example: note how each request name is prefixed with $/slither/. You will need to manually send request from the VSCode extension in order to trigger these handlers.

Metadata

Release files for slither-lsp 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for slither-lsp 0.0.1
File Size Uploaded
slither-lsp-0.0.1.tar.gz 52.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for slither-lsp 0.0.1
File Interpreter ABI Platform
slither_lsp-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 101.5 kB

Release files / slither-lsp-0.0.1.tar.gz

Download URL slither-lsp-0.0.1.tar.gz
Size 52.9 kB
Tags Source
SHA-256 checksum
How to use checksums
a0e22548b73b93e131ca894d08292978027bb85c5da89b3591536335d8000fdb
BLAKE2b-256 checksum
How to use checksums
4cc1bc9bb8a2720df6f4379e7aa420e5ceabdf16fd3b08d14e7c645fc3d41b2e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / slither_lsp-0.0.1-py3-none-any.whl

Download URL slither_lsp-0.0.1-py3-none-any.whl
Size 48.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dc0e47255b167946aa9820592fb374fb4f9fa628c5b4d0ff0de59571babff980
BLAKE2b-256 checksum
How to use checksums
0ab6b80eed5cae588ec4bfed6d8f108242f6a9d2afd40a60620e0109513ef991
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page