Skip to content

About

Automatically restart language servers (like TypeScript/Vue/ESLint) when specific files or directories change. 当特定文件或目录发生变化时,自动重启语言服务器(如 TypeScript/Vue/ESLint)。

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Repository files navigation

Restart Language Server

English | 中文文档

Automatically restart language servers (like TypeScript/Vue/ESLint) when specific files or directories change.

Features

  • Auto Restart: Watches for file changes, checks file hashes, and only restarts when contents actually change.
  • 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.

Configuration

This extension contributes the following settings:

Setting Description Default
restart-language-server.enable Enable/disable this extension. true
restart-language-server.debug Enable verbose debug logging (file events and watcher details). false
restart-language-server.includes An array of glob patterns to watch.
Example: ["**/auto-imports.d.ts", "**/components.d.ts"]
["package.json", "package-lock.json", "pnpm-lock.yaml", ".yalc/**/package.json"]
restart-language-server.lsRestartCommands An array of VS Code commands to execute when a change is detected.
Example: ["typescript.restartTsServer", "eslint.restart"]
["typescript.restartTsServer"]

Usage Example

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"
  ]
}

License

MIT

About

Automatically restart language servers (like TypeScript/Vue/ESLint) when specific files or directories change. 当特定文件或目录发生变化时,自动重启语言服务器(如 TypeScript/Vue/ESLint)。

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages