/pluto-language-server

Pluto linting & completions via LSP.

Primary LanguageC++The UnlicenseUnlicense

Pluto Language Server

Using it with VS Code

Search for calamity-inc.pluto-language-server in the marketplace and press "Install."

The server & plutoc executables are bundled and the server is automatically started. If that's too Windows-only or magical for you, version 0.4.0 of the VSIX still works — you just need to manually set up the language server (see below).

Using it with other editors

Set up the language server

  1. Grab the latest pluto-language-server.exe from Releases or compile it yourself.
  2. Get plutoc either from Pluto's latest release or by compiling Pluto yourself.

Now you just need to run the server.

Note that the plutoc executable has to be in the server's working directory for it to properly function.

To run the server without a console window, you can use the pluto-language-server (no console).vbs script.

To run the server at startup, place a shortcut to either the server executable or "no console" script in %appdata%\Microsoft\Windows\Start Menu\Programs\Startup.

Connect to the language server

Once you've got the server up & running, you'll just have to tell your LSP client to connect to localhost at port 9170.

For clients that don't support or have trouble with TCP transport, you may provide them with the path to the stdio-proxy executable, which will allow the LSP client to communicate via STDIO and establishes the TCP connection on its behalf.

Sublime Text

  1. If you don't already have the sublimelsp package installed, open the command palette and run Package Control: Install Package, then select LSP.
  2. Select Preferences > Package Settings > LSP > Settings and either replace or merge the righthand configuration with the following:
{
    "clients": {
        "pluto-language-server": {
            "enabled": true,
            "selector": "source.pluto",
            "tcp_port": 9170,
            "command": ["ping"]
        }
    }
}

Building the language server

This project uses Sun.

The following dependencies should have the same parent folder as this repository:

Inside of the server folder, just run sun and you should get the server executable.

Licensing

This project is dedicated to the public domain. However, note that Soup, Lua, and Pluto have more restrictive licensing.