Crates.io | openscad-language-server |
lib.rs | openscad-language-server |
version | 0.1.0 |
source | src |
created_at | 2021-09-22 05:00:05.502413 |
updated_at | 2021-09-22 05:00:05.502413 |
description | A Language Server Protocol server for OpenSCAD |
homepage | |
repository | https://github.com/dzhu/openscad-language-server |
max_upload_size | |
id | 454735 |
size | 41,565 |
openscad-language-server is an LSP (Language Server Protocol) server for OpenSCAD. It enables IDE-style features for OpenSCAD code in any editor for which an LSP client is available---i.e., most major modern text editors.
Status: Pretty basic by IDE standards, but functional and well beyond what the built-in OpenSCAD editor provides. Tested primarily with lsp-mode on Emacs on Linux.
include
/use
(of both local and library files)openscad-language-server is written in Rust and does not depend on OpenSCAD. Currently, in order to use it, you need to have a Rust toolchain installed.
To install the server from crates.io (puts the
binary into ~/.cargo/bin/openscad-language-server
):
cargo install openscad-language-server
To build directly from the repository (puts the binary into
target/release/openscad-language-server
in the clone):
git clone https://github.com/dzhu/openscad-language-server
cd openscad-language-server
cargo build --release
Consult the documentation for your editor and its LSP client to configure them to use the server binary for OpenSCAD files. The server communicates over standard input/output.
Parsing of OpenSCAD code is handled by tree-sitter and tree-sitter-openscad. Communicating over LSP is handled by lsp-server. Having those crates handling all the dirty details of interacting with the outside world has made it possible to get started on this project quite quickly and stay focused on the interesting parts in the middle.