stylus-lsp

Tree-sitter language server for Stylus and embedded component style blocks
549 1
Install
npm install stylus-lsp
Latest Version:0.6.2
License:MIT
Last Updated:Oct 13, 2026
Links: GitHub  ·  npm
Maintainer: wmikhail

Stylus Language Server

stylus-lsp is a Tree-sitter-based Language Server Protocol implementation for .styl, .stylus, and Stylus blocks embedded in Vue, Svelte, and Astro components.

Installation

npm install --global stylus-lsp
stylus-language-server --stdio

Node.js 22 or newer is required.

Capabilities

  • definition and import-path navigation
  • lexical references, prepare rename, and conflict-checked workspace rename
  • document and workspace symbols
  • scope/import-aware completion plus standard CSS property/value data
  • static value/signature/documentation hover and signature help
  • document colors and color presentations
  • syntax, symbol, import, cycle, conflict, and unused-local diagnostics
  • incremental parsing, unsaved documents, multi-root workspaces, and file events
  • Vue, Svelte, Astro, Quasar 0.17/1/2, Vite, Webpack, Nuxt, aliases, include paths, glob imports, themes, and node_modules

Configuration

Send settings under stylus through initialization options or workspace/didChangeConfiguration:

{
  "stylus": {
    "aliases": { "tokens": "src/styles/tokens" },
    "includePaths": ["src/styles"],
    "exclude": ["generated/**"],
    "presets": { "quasar": "auto" },
    "themes": {
      "light": "src/themes/light.styl",
      "dark": "src/themes/dark.styl"
    },
    "activeTheme": "dark",
    "diagnostics": {
      "debounceMs": 150,
      "rules": { "unusedLocalVariable": { "severity": "hint" } }
    }
  }
}

Vite, Webpack, Nuxt, tsconfig.json, and jsconfig.json aliases are read statically. Project configuration is never imported or executed; use explicit aliases if a configuration is dynamic.

See the repository's language-server guide for every setting and diagnostic code.

Development

npm install
npm run check
npm test
npm run benchmark -- --sizes=1000,5000,10000
npm pack

Related Packages

verter-lsp

Language Server Protocol server for Vue and Svelte single-file components

839 114
@verter/language-shared

Contains shared information between the language server and the language client

1,555 114
graphql-language-service-server

Server process backing the GraphQL Language Service

446,943 16,920
typescript-eslint-parser-for-extra-files

An experimental ESLint custom parser for Vue, Svelte, and Astro for use with Typ...

112,278 53
@xevion/ts-eslint-extra

An experimental ESLint custom parser for Vue, Svelte, and Astro for use with Typ...

3,720 0

Version History

Version Released License
0.6.2 MIT
0.6.1 MIT
0.6.0 MIT