terminal Claude Marketplace Browser
LSP v1.5.0

lsp-tools

Serveurs LSP pour l'analyse statique de code. Intègre TypeScript Language Server, ESLint LSP et Pylsp pour une analyse multi-langage.

Category Development
Version 1.5.0

Description & Examples

lsp-tools

LSP server integration plugin that enables static analysis and intelligent code assistance for TypeScript, JavaScript, and Python directly within the Claude Code workflow.

What it does

This plugin configures three language servers — typescript-language-server for TypeScript and JavaScript, eslint-lsp for style and quality linting, and pylsp for Python. Together they provide diagnostics, hover information, go-to-definition, and refactoring capabilities that Claude can leverage when analysing or modifying code.

When to use it

Use this plugin on any project where you want Claude to have live access to compiler diagnostics and linter output rather than relying solely on static file analysis. It is especially helpful for large TypeScript codebases where type errors and import resolution are critical to generating correct code changes.

Components

code
typescript-language-server LSP
expand_more

typescript-language-server

LSP server for TypeScript and JavaScript projects. Provides full type-checking diagnostics, symbol resolution, and refactoring support powered by the TypeScript compiler service.

Installation prerequisite

The language server binary must be available on PATH:

npm install -g typescript typescript-language-server

Capabilities provided

Capability Description
Diagnostics Type errors, missing imports, unused variables
Hover Type information and JSDoc for any symbol
Go to definition Navigate to the declaration of any symbol
Find references List all usages of a symbol across the project
Rename Safe rename across all files in the project
Code actions Quick fixes, auto-imports, organise imports
Inlay hints Inline parameter names and inferred types
Completion Context-aware symbol and keyword suggestions

Configuration

The server reads tsconfig.json from the project root. Ensure your tsconfig.json includes the files you want to analyse:

{
  "compilerOptions": {
    "strict": true,
    "moduleResolution": "bundler",
    "target": "ES2022"
  },
  "include": ["src/**/*"]
}

Plugin settings

{
  "typescript-language-server": {
    "tsserverPath": "node_modules/.bin/tsserver",
    "preferences": {
      "includeInlayParameterNameHints": "all",
      "includeInlayReturnTypeHints": true
    }
  }
}

Notes

  • JavaScript projects are supported via allowJs: true in tsconfig.json or via jsconfig.json
  • Performance scales with project size; for very large monorepos, consider scoping tsconfig.json to the relevant package
code
eslint-lsp LSP
expand_more

eslint-lsp

LSP server that exposes ESLint diagnostics and code actions through the Language Server Protocol. Provides real-time linting feedback for JavaScript and TypeScript files as they are edited.

Installation prerequisite

npm install -g eslint @microsoft/eslint-language-service
# or use the project-local ESLint if already installed

Capabilities provided

Capability Description
Diagnostics ESLint rule violations with severity (error/warning)
Code actions Auto-fix for fixable rule violations
Formatting Apply --fix to a file or selection

Configuration

The server picks up .eslintrc.*, eslint.config.js (flat config), or the eslintConfig key in package.json from the workspace root. Standard ESLint configuration applies:

// eslint.config.js
export default [
  {
    files: ["src/**/*.{js,ts}"],
    rules: {
      "no-unused-vars": "error",
      "no-console": "warn",
      "eqeqeq": ["error", "always"]
    }
  }
];

Plugin settings

{
  "eslint-lsp": {
    "run": "onType",
    "workingDirectory": "${workspaceFolder}",
    "nodePath": null,
    "validate": ["javascript", "typescript"]
  }
}

Notes

  • When both typescript-language-server and eslint-lsp are active, TypeScript diagnostics and ESLint diagnostics are merged into a single diagnostic stream
  • Rules that require type information (e.g., @typescript-eslint/no-floating-promises) require parserOptions.project to point to your tsconfig.json
code
pylsp LSP
expand_more

pylsp

LSP server for Python based on the Python Language Server Protocol implementation. Provides diagnostics, hover, completion, and formatting for Python projects.

Installation prerequisite

pip install python-lsp-server[all]
# or with specific plugins only:
pip install python-lsp-server pylsp-mypy python-lsp-black pylsp-rope

Capabilities provided

Capability Description
Diagnostics Syntax errors, undefined names, unused imports (via pyflakes)
Type checking Optional Mypy integration for static type errors
Hover Type signatures and docstrings
Go to definition Navigate to symbol declaration
Find references List all usages
Rename Symbol rename across the project
Formatting Black or autopep8 on save or on demand
Code actions Auto-import, remove unused imports

Configuration

pylsp reads pyproject.toml or .pylsp.toml:

[tool.pylsp]
plugins.pyflakes.enabled = true
plugins.pylsp_mypy.enabled = true
plugins.pylsp_mypy.strict = false
plugins.black.enabled = true
plugins.autopep8.enabled = false
plugins.rope_autoimport.enabled = true

Virtual environment support

The server uses whichever Python interpreter is active when it starts. For projects with a virtualenv, activate it first:

source .venv/bin/activate
# or use direnv / pyenv-virtualenv for automatic activation

Plugin settings

{
  "pylsp": {
    "plugins": {
      "pylsp_mypy": { "enabled": true, "dmypy": false },
      "black": { "enabled": true },
      "flake8": { "enabled": false }
    }
  }
}

Notes

  • Mypy integration significantly increases analysis time on first run; subsequent runs use a cache
  • For monorepos with multiple packages, set rootPath to the specific package directory rather than the repo root