#lsp #cargo #crates

app crates-lsp

Language Server Protocol implementation for Cargo.toml manifests

3 releases

0.1.7 Apr 24, 2025
0.1.6 Mar 18, 2025
0.1.5 Jan 28, 2025

#117 in Cargo plugins

Download history 29/week @ 2025-01-22 87/week @ 2025-01-29 10/week @ 2025-02-05 7/week @ 2025-02-12 1/week @ 2025-02-19 3/week @ 2025-02-26 48/week @ 2025-03-12 98/week @ 2025-03-19 11/week @ 2025-03-26 1/week @ 2025-04-02 139/week @ 2025-04-23 15/week @ 2025-04-30

154 downloads per month

MIT license

58KB
1.5K SLoC

crates-lsp

Language Server implementation targeted specifically towards the Cargo.toml file of Rust projects, providing auto-completion for crate versions and in-editor hints when the selected crate versions are out of date.

This project was started specifically to be used with the Lapce editor plugin lapce-crates, but should work with any LSP-capable editor.

Project is heavily inspired by the crates plugin for VSCode.

Usage

Lapce

To use this with Lapce, install the Crates plugin from within the Lapce editor.

Helix

@ameknite kindly provided this example configuration for the Helix editor:

[[language]]
name = "toml"
language-servers = [
    { name = "crates-lsp", except-features = [
        "format",
    ] },
    "taplo",
]

formatter = { command = "taplo", args = ["fmt", "-"] }

Dependencies

~10–22MB
~293K SLoC