---
name: lsp-status
description: Check LSP server installation status. Shows which language servers are available.
---

# LSP Status Skill

## Description

This skill checks the installation status of Language Server Protocol (LSP) servers for different programming languages. Use this before using other LSP-based features.

## When to Use

- Before using `/definition` or `/references` skills
- When LSP features fail with server errors
- When setting up a new development environment
- When the user asks about available language support

## How to Use

### Check Status

Use the `check_lsp_servers` tool:

```python
check_lsp_servers()
```

### Interpret Results

The tool returns status for each supported language:
- `installed`: Whether the server binary is available
- `running`: Whether a server instance is active
- `command`: The command used to start the server
- `error`: Installation instructions if not installed

## Output Format

```json
{
  "python": {
    "installed": true,
    "running": false,
    "command": ["pylsp"],
    "error": null
  },
  "javascript": {
    "installed": false,
    "running": false,
    "command": ["typescript-language-server", "--stdio"],
    "error": "Install with: npm install -g typescript-language-server typescript"
  },
  "c": {
    "installed": true,
    "running": false,
    "command": ["clangd"],
    "error": null
  }
}
```

## Installation Instructions

### Python (pylsp)
```bash
pip install python-lsp-server

# With additional features
pip install python-lsp-server[all]
```

### JavaScript/TypeScript (typescript-language-server)
```bash
npm install -g typescript-language-server typescript
```

### C/C++ (clangd)

**macOS:**
```bash
brew install llvm
# or
xcode-select --install  # includes clangd
```

**Ubuntu/Debian:**
```bash
sudo apt install clangd
```

**Windows:**
```bash
# Download from https://releases.llvm.org/
# Or install via Visual Studio
```

## Troubleshooting

### Server Not Found

If a server shows as not installed but you've installed it:
1. Check if it's in your PATH
2. Try running the command manually: `pylsp --version`
3. Restart your terminal/shell

### Server Crashes

If LSP features fail after working initially:
1. The server may have crashed
2. Use `check_lsp_servers` to verify status
3. Try the operation again (server will restart)

## Notes

- Servers start on-demand when you use LSP features
- Each language has its own server process
- Servers are stopped when IEUM exits
- Some servers require project-specific config (e.g., pyrightconfig.json)
