#language-server #lsp #openscad

app openscad-lsp

A language(LSP) server for OpenSCAD

7 stable releases

1.2.3 Oct 13, 2022
1.2.1 Aug 8, 2022
1.2.0 Jul 29, 2022
1.0.2 May 27, 2022

#261 in Development tools

Download history 6/week @ 2022-12-02 4/week @ 2022-12-09 14/week @ 2022-12-16 21/week @ 2022-12-23 17/week @ 2022-12-30 29/week @ 2023-01-06 29/week @ 2023-01-13 21/week @ 2023-01-20 37/week @ 2023-01-27 28/week @ 2023-02-03 66/week @ 2023-02-10 46/week @ 2023-02-17 22/week @ 2023-02-24 13/week @ 2023-03-03 28/week @ 2023-03-10 36/week @ 2023-03-17

104 downloads per month


1.5K SLoC


A LSP (Language Server Protocol) server for OpenSCAD.

inspired by dzhu/openscad-language-server

Tested with VSCode on Mac and Windows. [vscode extension]

Tested with lsp-mode on Emacs on Linux by @Lenbok.


  • builtin fucntion/module documents
  • 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.


openscad-LSP is written in Rust, in order to use it, you need to install Rust toolchain.

cargo install openscad-lsp


cd openscad-LSP
cargo build --release


The server communicates over TCP socket (

    openscad-lsp [OPTIONS]

        --builtin <BUILTIN>        external builtin functions file path, if set, the built-in
                                   builtin functions file will not be used [default: ]
        --fmt-exe <FMT_EXE>        clang format executable file path [default: clang-format]
        --fmt-style <FMT_STYLE>    LLVM, GNU, Google, Chromium, Microsoft, Mozilla, WebKit, file
                                   [default: Microsoft]
    -h, --help                     Print help information
        --ignore-default           exclude defualt params in auto-completion
        --ip <IP>                  [default:]
    -p, --port <PORT>              [default: 3245]
        --stdio                    use stdio instead of tcp
    -V, --version                  Print version information

To change the config during running, you can send notification workspace/didChangeConfiguration

// example
    "settings": {
        "openscad": {
            "search_paths": "/libs",
            "fmt_exe": "/usr/bin/clang-format",
            "fmt_style": "file",
            "default_param": true

If you work with vscode, you can install the extension directly from the marketplace


~205K SLoC