Skip to content

feat(lsp): add PowerShellEditorServices language server - #40

Merged
hashbender merged 1 commit into
mainfrom
mirror/pr-55930
Jun 30, 2026
Merged

feat(lsp): add PowerShellEditorServices language server#40
hashbender merged 1 commit into
mainfrom
mirror/pr-55930

Conversation

@hashbender

Copy link
Copy Markdown
Owner

Summary

Hermes now provides semantic diagnostics for PowerShell files (.ps1 / .psm1 / .psd1) by wiring PowerShellEditorServices into the LSP server registry.

PSES is not a single PATH binary — it's a PowerShell module bundle launched by a pwsh/powershell host via Start-EditorServices.ps1. It ships as a GitHub release zip (no npm/go/pip recipe), so it sits in the manual install tier alongside rust-analyzer and clangd.

Changes

  • agent/lsp/servers.py: register the powershell server — extensions, powershell language IDs, a root resolver (PSScriptAnalyzer settings → git workspace), a bundle-locator, and a stdio spawn builder that launches pwsh -NoProfile -NonInteractive ... Start-EditorServices.ps1 -Stdio.
  • agent/lsp/install.py: manual-tier recipe so hermes lsp status/list report it (probes the pwsh host).
  • website/docs/user-guide/features/lsp.md: supported-servers row + a PowerShell setup section.
  • tests/agent/lsp/test_powershell_server.py: 8 tests (routing, language IDs, skip-without-pwsh, skip-without-bundle, command construction, override precedence, bundlePath not leaked into init options).

Bundle resolution order: lsp.servers.powershell.command override → init bundlePathPSES_BUNDLE_PATH env → <HERMES_HOME>/lsp/PowerShellEditorServices.

Validation

Result
New tests 8 passed
Full LSP suite 153 passed
E2E (real imports, isolated HERMES_HOME) .ps1/.psm1/.psd1 route to powershell, spawn command built correctly, lsp statusinstalled once pwsh found

Infographic

PowerShell LSP

Nous Research


Mirror-of: NousResearch#55930
NousResearch#55930

@hashbender
hashbender merged commit 4553684 into main Jun 30, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant