sublimelsp / LSP-angular

Convenience plugin for Angular Language Service
MIT License
9 stars 2 forks source link

LSP-angular

This is a helper package that automatically installs and updates the Angular Language Server for you.

Installation

Configuration

Open configuration file using command palette with Preferences: LSP-angular Settings command or opening it from the Sublime menu (Preferences > Package Settings > LSP > Servers > LSP-angular).

Versioning

This language service extension relies on the @angular/language-server and typescript packages for its backend. @angular/language-server is always bundled with the extension, and is always the latest version at the time of the release.

For people who need an older version of the angular server, this is how to point to a local @angular/language-server.

Override the start command in a ST project file, to point to a local @angular/language-server

{
  "folders": [
    {
      "path": "."
    }
  ],
  "settings": {
    "LSP": {
      "LSP-angular": {
        "command": [
          "${node_bin}",
          "${folder}/node_modules/@angular/language-server/index.js", // adjust the path based on your project
          "--ngProbeLocations", "${folder}/node_modules",  // adjust the path based on your project
          "--tsProbeLocations", "${folder}/node_modules",  // adjust the path based on your project
          "--stdio"
        ]
      },
    }
  }
}