Skip to content

Powershell#

Server#

For more information about the LSP server, check PowerShellEditorServices.

Installation#

This Server supports automatic install. Install this language server with M-xlsp-install-serverRETpwsh-lsRET.

Automatic

Debugger: Yes#

Available configurations#

lsp-pwsh-help-completion#

Default: BlockComment

Controls the comment-based help completion behavior triggered by typing ’##’. Set the generated help style with ’BlockComment’ or ’LineComment’. Disable the feature with ’Disabled’.


lsp-pwsh-script-analysis-enable#

Default: t

Enables real-time script analysis from PowerShell Script Analyzer. Uses the newest installed version of the PSScriptAnalyzer module or the version bundled with this extension, if it is newer.


lsp-pwsh-script-analysis-settings-path#

Default: ``

Specifies the path to a PowerShell Script Analyzer settings file. To override the default settings for all projects, enter an absolute path, or enter a path relative to your workspace.


lsp-pwsh-code-folding-enable#

Default: t

Enables syntax based code folding. When disabled, the default indentation based code folding is used.


lsp-pwsh-code-folding-show-last-line#

Default: t

Shows the last line of a folded section. Similar to the default VSCode folding style. When disabled, the entire folded region is hidden.


lsp-pwsh-code-formatting-preset#

Default: Custom

Sets the codeformatting options to follow the given indent style. Sets in a way that is compatible with PowerShell syntax. For more information about the brace styles please refer to https://github.com/PoshCode/PowerShellPracticeAndStyle/issues/81.


lsp-pwsh-code-formatting-open-brace-on-same-line#

Default: t

Places open brace on the same line as its associated statement.


lsp-pwsh-code-formatting-new-line-after-open-brace#

Default: t

Adds a newline (line break) after an open brace.


lsp-pwsh-code-formatting-new-line-after-close-brace#

Default: t

Adds a newline (line break) after a closing brace.


lsp-pwsh-code-formatting-pipeline-indentation-style#

Default: NoIndentation

Multi-line pipeline style settings.


lsp-pwsh-code-formatting-whitespace-before-open-brace#

Default: t

Adds a space between a keyword and its associated scriptblock expression.


lsp-pwsh-code-formatting-whitespace-before-open-paren#

Default: t

Adds a space between a keyword (if, elseif, while, switch, etc) and its associated conditional expression.


lsp-pwsh-code-formatting-whitespace-around-operator#

Default: t

Adds spaces before and after an operator (’=’, ’+’, ’-’, etc.).


lsp-pwsh-code-formatting-whitespace-after-separator#

Default: t

Adds a space after a separator (’,’ and ’;’).


lsp-pwsh-code-formatting-whitespace-inside-brace#

Default: t

Adds a space after an opening brace (’{’) and before a closing brace (’}’).


lsp-pwsh-code-formatting-whitespace-around-pipe#

Default: t

Adds a space before and after the pipeline operator (’|’).


lsp-pwsh-code-formatting-ignore-one-line-block#

Default: t

Does not reformat one-line code blocks, such as "if (...) {...} else {...}".


lsp-pwsh-code-formatting-align-property-value-pairs#

Default: t

Align assignment statements in a hashtable or a DSC Configuration.


lsp-pwsh-code-formatting-use-correct-casing#

Default: nil

Use correct casing for cmdlets.


lsp-pwsh-developer-editor-services-log-level#

Default: Normal

Sets the log level for the PowerShell Editor Services host executable. Valid values are ’Diagnostic’, ’Verbose’, ’Normal’, ’Warning’, and ’Error’


lsp-pwsh-developer-editor-services-wait-for-debugger#

Default: nil

Launches the language service with the /waitForDebugger flag to force it to wait for a .NET debugger to attach before proceeding.


lsp-pwsh-developer-feature-flags#

Default: nil

An array of strings that enable experimental features in the PowerShell extension.


lsp-pwsh-ext-path#

Default: /home/runner/.emacs.d/.cache/lsp/pwsh

The path to powershell vscode extension.


lsp-pwsh-exe#

Default: /usr/bin/pwsh

PowerShell executable.


lsp-pwsh-dir#

Default: /home/runner/.emacs.d/.cache/lsp/pwsh/PowerShellEditorServices

Path to PowerShellEditorServices without last slash.


lsp-pwsh-github-asset-url#

Default: https://github.com/%s/%s/releases/latest/download/%s

GitHub latest asset template url.



Last update: April 15, 2021