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-code-folding-enable#
Type: boolean
Default: t
Enables syntax based code folding. When disabled, the default indentation based code folding is used.
lsp-pwsh-code-folding-show-last-line#
Type: boolean
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-align-property-value-pairs#
Type: boolean
Default: t
Align assignment statements in a hashtable or a DSC Configuration.
lsp-pwsh-code-formatting-ignore-one-line-block#
Type: boolean
Default: t
Does not reformat one-line code blocks, such as "if (...) {...} else {...}".
lsp-pwsh-code-formatting-new-line-after-close-brace#
Type: boolean
Default: t
Adds a newline (line break) after a closing brace.
lsp-pwsh-code-formatting-new-line-after-open-brace#
Type: boolean
Default: t
Adds a newline (line break) after an open brace.
lsp-pwsh-code-formatting-open-brace-on-same-line#
Type: boolean
Default: t
Places open brace on the same line as its associated statement.
lsp-pwsh-code-formatting-pipeline-indentation-style#
Type: (choice (const IncreaseIndentationForFirstPipeline) (const IncreaseIndentationAfterEveryPipeline) (const NoIndentation))
Default: NoIndentation
Multi-line pipeline style settings.
lsp-pwsh-code-formatting-preset#
Type: (choice (const Custom) (const Allman) (const OTBS) (const Stroustrup))
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-use-correct-casing#
Type: boolean
Default: nil
Use correct casing for cmdlets.
lsp-pwsh-code-formatting-whitespace-after-separator#
Type: boolean
Default: t
Adds a space after a separator (, and ;).
lsp-pwsh-code-formatting-whitespace-around-operator#
Type: boolean
Default: t
Adds spaces before and after an operator (=, +, -, etc.).
lsp-pwsh-code-formatting-whitespace-around-pipe#
Type: boolean
Default: t
Adds a space before and after the pipeline operator (|).
lsp-pwsh-code-formatting-whitespace-before-open-brace#
Type: boolean
Default: t
Adds a space between a keyword and its associated scriptblock expression.
lsp-pwsh-code-formatting-whitespace-before-open-paren#
Type: boolean
Default: t
Adds a space between a keyword (if, elseif, while, switch, etc) and its associated conditional expression.
lsp-pwsh-code-formatting-whitespace-inside-brace#
Type: boolean
Default: t
Adds a space after an opening brace ({) and before a closing brace (}).
lsp-pwsh-developer-editor-services-log-level#
Type: (choice (const Diagnostic) (const Verbose) (const Normal) (const Warning) (const Error))
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#
Type: boolean
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#
Type: (repeat string)
Default: nil
An array of strings that enable experimental features in the PowerShell extension.
lsp-pwsh-dir#
Type: string
Default: /home/runner/work/lsp-mode/lsp-mode/docs/.eask/30.2/.cache/lsp/pwsh
Path to PowerShellEditorServices without last slash.
lsp-pwsh-exe#
Type: string
Default: /usr/bin/pwsh
PowerShell executable.
lsp-pwsh-ext-path#
Type: string
Default: /home/runner/work/lsp-mode/lsp-mode/docs/.eask/30.2/.cache/lsp/pwsh
The path to powershell vscode extension.
lsp-pwsh-github-asset-url#
Type: string
Default: https://github.com/%s/%s/releases/latest/download/%s
GitHub latest asset template url.
lsp-pwsh-help-completion#
Type: (choice (const Disabled) (const BlockComment) (const LineComment))
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#
Type: boolean
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#
Type: string
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.