Compact-lsp – Language Server Protocol Implementation for Compact

compact-lsp is a Language Server Protocol (LSP) implementation for the Compact smart contract language, providing IDE features for editors that support LSP.

:warning: Note: This is an experimental project developed in my personal free time for educational purposes — primarily to learn how Language Server Protocol implementations work. While functional, it is not officially supported. Feedback and contributions are welcome!

Features

Feature Description
Diagnostics Real-time syntax errors + compiler errors on save
Completion Keywords, types, snippets, local and imported symbols
Hover Documentation for keywords, types, and symbols
Go to Definition Jump to symbol definitions (local and imported)
Find References Find all usages of a symbol (local and cross-file)
Rename Rename symbols across the workspace
Signature Help Parameter hints while typing function calls
Semantic Tokens Rich syntax highlighting
Document Symbols Outline view (circuits, structs, enums, modules)
Formatting Code formatting via format-compact

Requirements

  • Rust toolchain (for building)
  • compactc compiler (for diagnostics)

Building

cargo build --release

Binary: target/release/compact-lsp

Links

:link: GitHub: GitHub - 1NickPappas/compact-lsp: Language Server Protocol (LSP) implementation for Compact smart contract language (Midnight network) – diagnostics, completion, hover, go-to-definition, references, rename, and more

Related


:test_tube: Any feedback, suggestions, or contributions are greatly appreciated!

1 Like