#language-server #thrift #thrift-ls

bin+lib thrift-ls

A language server for Thrift

6 releases

new 0.1.6 Apr 16, 2025
0.1.5 Apr 13, 2025
0.1.0 Mar 22, 2025

#95 in Text editors

Download history 109/week @ 2025-03-19 8/week @ 2025-03-26 473/week @ 2025-04-09

590 downloads per month

MIT license

170KB
4.5K SLoC

Rust 4K SLoC // 0.0% comments Thrift 214 SLoC // 0.5% comments TypeScript 214 SLoC JavaScript 84 SLoC // 0.1% comments

thrift-ls

A Thrift language server.

This project contains two programs:

  • Rust binary: A language server for Thrift.
  • VS Code extension: A VS Code extension for Thrift. This extension uses the WASM output of the Rust library.

Features

  • semantic syntax highlighting.
  • go to definition.
  • diagnostics.
  • completion.

How to Build

Prerequisites

  • Cargo installed (see here).
  • Node.js installed (optional, for building the VS Code extension).

Build with Cargo

  1. Clone and Build
    git clone https://github.com/ocfbnj/thrift-ls.git
    cd thrift-ls
    cargo build --release
    
    Now you can find the binary in ./target/release/thrift-ls.

Build VS Code Extension

  1. Install wasm-pack and wasm-bindgen-cli

    cargo install wasm-pack wasm-bindgen-cli
    
  2. Install vsce

    npm install -g @vscode/vsce
    
  3. Build the VS Code extension

    cd editors/code
    npm install
    npm run compile
    vsce package
    

    Now you can find the VS Code extension in ./thrift-ls-x.x.x.vsix.

Dependencies

~1–15MB
~123K SLoC