openscad-LSP
A LSP (Language Server Protocol)
server for OpenSCAD.
inspired by dzhu/openscad-language-server
Tested with VSCode on Mac and Windows.
Tested with lsp-mode on Emacs on Linux by @Lenbok.
Features
- code and path auto-completion
- jump to definition
- code snippets
- function/module signatures on hover
- document symbols
- formatter, utilizing clang-format, you need install it youself, it is not built-in.
- hover and suggestion documentation, read from comments before the function/module.
If you want to write documentation for the builtin function/module, feel free to submit pr.
Build
openscad-LSP is written in Rust, in order to use it, you need to
install Rust toolchain.
{.sh}
cd openscad-LSP
cargo build --release
Usage
The server communicates over TCP socket (127.0.0.1:3245).
```
USAGE:
openscad-lsp [OPTIONS]
OPTIONS:
--fmt-exe clang format executable file path [default: clang-format]
--fmt-style LLVM, GNU, Google, Chromium, Microsoft, Mozilla, WebKit, file
[default: Microsoft]
-h, --help Print help information
--ip [default: 127.0.0.1]
-p, --port [default: 3245]
-V, --version Print version information
```
If you work with vscode, you can install the extension directly form the marketplace