Skip to content

Instantly share code, notes, and snippets.

@mattbaker
Forked from binaryseed/st4-elixir-lsp.md
Created May 25, 2021 18:17
Show Gist options
  • Save mattbaker/53204e4e2fe06657f1b7f8ef1e64df21 to your computer and use it in GitHub Desktop.
Save mattbaker/53204e4e2fe06657f1b7f8ef1e64df21 to your computer and use it in GitHub Desktop.
ST4 + Elixir LSP

Getting Sublime Text 4 working with Elixir LSP

Install packages

I'm running the latest versions of:

They are both installed by cloning the repo to get the latest versions:

cd "~/Library/Application Support/Sublime Text 3/Packages"
git clone [email protected]:sublimelsp/LSP.git
git clone git://github.com/elixir-lang/elixir-tmbundle Elixir

Install Elixir LS

Clone the Elixir Language Server repo and compile:

git clone [email protected]:elixir-lsp/elixir-ls.git
cd elixir-ls
mix compile
mix elixir_ls.release -o release/

Configure LSP.sublime-settings to point to the Elixir LS "release" we just compiled:

"clients": {
  "elixir-ls": {
    "command": [
      "ABSOLUTE_ELIXIR_LS_PATH/release/language_server.sh"
    ],
    "enabled": true,
    "languageId": "elixir",
    "scopes": [
      "source.elixir"
    ],
    "settings": {
    },
    "syntaxes": [
      "Packages/Elixir/Syntaxes/Elixir.tmLanguage"
    ]
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment