Skip to main content

Vyper Language Server

Project description

Couleuvre

A lightweight Language Server for Vyper. It parses Vyper modules, extracts symbols, and supports basic navigation such as go-to-definition (including across imports), works with any Vyper versions, and doesn't require Vyper to be installed.

Features

Feature Status
Syntax Highlighting ❌ Planned
Go to Definition ⚠️ Alpha
Go to Modules ⚠️ Alpha
Document Symbols ✅ Supported
Workspace Symbols ❌ Planned
References ❌ Planned
Hover Information ❌ Planned
Diagnostics (Errors/Warnings) ❌ Planned
Code Completion ❌ Planned
Document Formatting ❌ Planned
  • Automatic environment handling:
    • If the current environment already has the requested vyper version, use it directly
    • Otherwise, spin up and cache a dedicated uv-managed venv with the required vyper version

Requirements

Installation

uv sync

Usage

  • As an LSP server (from source):
uv run -m couleuvre

How Vyper version is selected

  • Contracts can specify the compiler version via a pragma or annotation in the source.
  • If no version is found, a default can be provided by the server or it will error.
  • Environment usage:
    • If the running environment's vyper matches the contract's version, it is used directly. This allows for resolving imports by using the current environment's search paths (e.g. snekmate)
    • Otherwise, Couleuvre creates/uses a cached virtualenv (via uv) for that version and runs Vyper with that interpreter. In this case, external imports are not resolved.

Your editor should connect to the server via stdio (pygls). Point your client configuration to the above command.

Testing

uv run pytest

Alternatives

  • The official Vyper Language Server (https://github.com/vyperlang/vyper-lsp) is more feature-complete but only supports Vyper >= 0.4.1 and requires Vyper to be installed in the environment.

Disclaimer

Couleuvre is in early development, use at your own risk. Couleuvre is not affiliated with the Vyper project.

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

couleuvre-0.0.1.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

couleuvre-0.0.1-py3-none-any.whl (16.2 kB view details)

Uploaded Python 3

File details

Details for the file couleuvre-0.0.1.tar.gz.

File metadata

  • Download URL: couleuvre-0.0.1.tar.gz
  • Upload date:
  • Size: 11.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.29

File hashes

Hashes for couleuvre-0.0.1.tar.gz
Algorithm Hash digest
SHA256 672af00541db9cdf54dc9f6d93ea39b611eb04ce4b57d0817955898b0475f48a
MD5 e8ee024a90275ae2d95efecd4dac5f35
BLAKE2b-256 b0e1996e13637e511c657b32d3ef20e545c620a9db5b70295e71385c1c4a7770

See more details on using hashes here.

File details

Details for the file couleuvre-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: couleuvre-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 16.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.29

File hashes

Hashes for couleuvre-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e2f9de1a9d21dde77887bc30f7dcb92b61fa99f373d5796c1bd1782c26824907
MD5 c8a4ac3d84acab3bd8ca6e457e913dd9
BLAKE2b-256 997ff6a233a2419afd15c7271df176f45e33373404b801c505a078db95472834

See more details on using hashes here.

Supported by

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