English | 中文文档
Automatically restart language servers (like TypeScript/Vue/ESLint) when specific files or directories change.
- Auto Restart: Watches for file changes in your workspace and automatically triggers restart commands.
- Configurable Watch Patterns: Define exactly which files or folders should trigger a restart using glob patterns.
- Custom Commands: Configure which VS Code commands to execute (e.g.,
typescript.restartTsServer,eslint.restart). - Non-intrusive Notifications: Shows a subtle progress bar notification when restarting, keeping your workflow uninterrupted. Detailed logs are available in the Output channel.
This extension contributes the following settings:
| Setting | Description | Default |
|---|---|---|
restart-language-server.enable |
Enable/disable this extension. | true |
restart-language-server.includes |
An array of glob patterns to watch. Example: ["**/auto-imports.d.ts", "**/components.d.ts"] |
[] |
restart-language-server.lsRestartCommands |
An array of VS Code commands to execute when a change is detected. Example: ["typescript.restartTsServer", "eslint.restart"] |
["typescript.restartTsServer"] |
Add the following to your .vscode/settings.json to restart TypeScript and ESLint servers whenever auto-generated declaration files change:
{
"restart-language-server.includes": [
"**/auto-imports.d.ts",
"**/components.d.ts"
],
"restart-language-server.lsRestartCommands": [
"typescript.restartTsServer",
"eslint.restart"
]
}MIT