mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-14 16:07:52 +00:00
With pwsh installed but PSES_BUNDLE_PATH unset, PowerShell Editor Services was launched with a broken path and restarted in a loop with a crash notification each time. Language servers can now declare requires-env; while one of those variables is unset or empty (in the server's env and the IDE's environment) the server counts as missing and shows its install hint instead of starting. powershell.toml declares PSES_BUNDLE_PATH; the field is documented.
16 lines
1022 B
TOML
16 lines
1022 B
TOML
id = "powershell"
|
|
name = "PowerShell"
|
|
extensions = ["ps1", "psm1", "psd1", "pssc", "psrc"]
|
|
first-line = "^#!.*\\bpwsh\\b"
|
|
line-comment = "#"
|
|
block-comment = ["<#", "#>"]
|
|
indent = { tab-size = 4, insert-spaces = true }
|
|
ui-mode = "PowerShell"
|
|
|
|
[[language-servers]]
|
|
name = "powershell-editor-services"
|
|
command = "pwsh"
|
|
args = ["-NoLogo", "-NoProfile", "-NonInteractive", "-Command", "& \"$env:PSES_BUNDLE_PATH/PowerShellEditorServices/Start-EditorServices.ps1\" -BundledModulesPath $env:PSES_BUNDLE_PATH -LogPath ([IO.Path]::Combine([IO.Path]::GetTempPath(), 'openidea-pses.log')) -SessionDetailsPath ([IO.Path]::Combine([IO.Path]::GetTempPath(), 'openidea-pses.json')) -FeatureFlags @() -AdditionalModules @() -HostName openidea -HostProfileId openidea -HostVersion 1.0.0 -Stdio -LogLevel Normal"]
|
|
requires-env = ["PSES_BUNDLE_PATH"]
|
|
install-hint = "Install PowerShell 7 (pwsh), unzip PowerShellEditorServices.zip from https://github.com/PowerShell/PowerShellEditorServices/releases and set PSES_BUNDLE_PATH to that folder"
|