feat(lsp): add PowerShellEditorServices language server (#55930)
Registers PowerShell (.ps1/.psm1/.psd1) in the LSP server registry, spawning PowerShellEditorServices over stdio via a pwsh/powershell host. PSES ships as a GitHub release zip (no npm/go/pip recipe), so it sits in the manual install tier alongside rust-analyzer and clangd. The spawn builder resolves the module bundle from (in order) the lsp.servers.powershell.command override, init bundlePath, the PSES_BUNDLE_PATH env var, or <HERMES_HOME>/lsp/PowerShellEditorServices, then launches Start-EditorServices.ps1 -Stdio with a non-interactive, no-profile host. hermes lsp status/list report it as manual-only until pwsh is present. Docs and tests included.
This commit is contained in:
parent
812236bff8
commit
97e0bbef53
4 changed files with 289 additions and 0 deletions
|
|
@ -86,12 +86,35 @@ agent sees a syntax-clean file with semantic problems as
|
|||
| Prisma | `prisma language-server` | manual |
|
||||
| Kotlin | `kotlin-language-server` | manual |
|
||||
| Java | `jdtls` | manual |
|
||||
| PowerShell | `PowerShellEditorServices` (`pwsh` host) | manual (release zip) |
|
||||
|
||||
For "manual" entries, install the server through whatever toolchain
|
||||
manager makes sense for that language (rustup, ghcup, opam, brew,
|
||||
…). Hermes auto-detects the binary on PATH or in
|
||||
`<HERMES_HOME>/lsp/bin/`.
|
||||
|
||||
### PowerShell
|
||||
|
||||
PowerShellEditorServices isn't a single binary — it's a PowerShell
|
||||
module bundle launched by a `pwsh` (PowerShell 7+) or `powershell`
|
||||
host. Setup:
|
||||
|
||||
1. Install [PowerShell](https://github.com/PowerShell/PowerShell) so
|
||||
`pwsh` (or Windows `powershell`) is on PATH.
|
||||
2. Download the latest release zip from
|
||||
[PowerShellEditorServices releases](https://github.com/PowerShell/PowerShellEditorServices/releases)
|
||||
and extract it.
|
||||
3. Point Hermes at the extracted bundle — the directory that contains
|
||||
`PowerShellEditorServices/Start-EditorServices.ps1`. Either:
|
||||
- set `lsp.servers.powershell.command: ["/path/to/bundle"]` in
|
||||
`config.yaml`, or
|
||||
- extract it to `<HERMES_HOME>/lsp/PowerShellEditorServices`, or
|
||||
- export `PSES_BUNDLE_PATH=/path/to/bundle`.
|
||||
|
||||
`hermes lsp status` reports `installed` once `pwsh` is found; if the
|
||||
bundle is missing you'll see a one-time warning in the logs with the
|
||||
download link.
|
||||
|
||||
A few servers are installed alongside a peer dependency that npm
|
||||
won't auto-pull. The current case is `typescript-language-server`,
|
||||
which requires the `typescript` SDK importable from the same
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue