You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Start docs
* steve and rob's feedback
* add note on API usage
* extra space after -
* Rob's gone social!
Co-Authored-By: Robert Holt <rjmholt@gmail.com>
-[lsp-powershell](https://github.com/kiennq/lsp-powershell), an Emacs PowerShell plugin
21
21
22
22
## Features
23
23
24
-
- The Language Service provides common editor features for the PowerShell language:
25
-
- Code navigation actions (find references, go to definition)
26
-
- Statement completions (IntelliSense)
27
-
- Real-time semantic analysis of scripts using PowerShell Script Analyzer
28
-
- The Debugging Service simplifies interaction with the PowerShell debugger (breakpoints, variables, call stack, etc)
29
-
- The [$psEditor API](http://powershell.github.io/PowerShellEditorServices/guide/extensions.html) enables scripting of the host editor
30
-
- A full, terminal-based Integrated Console experience for interactive development and debugging
24
+
- The Language Service provides common editor features for the PowerShell language:
25
+
- Code navigation actions (find references, go to definition)
26
+
- Statement completions (IntelliSense)
27
+
- Real-time semantic analysis of scripts using PowerShell Script Analyzer
28
+
- The Debugging Service simplifies interaction with the PowerShell debugger (breakpoints, variables, call stack, etc)
29
+
- The [$psEditor API](http://powershell.github.io/PowerShellEditorServices/guide/extensions.html) enables scripting of the host editor
30
+
- A full, terminal-based Integrated Console experience for interactive development and debugging
31
+
32
+
## Usage
33
+
34
+
Looking to integrate PowerShell Editor Services into your [Language Server Protocol](https://microsoft.github.io/language-server-protocol/) compliant editor or client? We support two ways of connecting.
35
+
36
+
### Named Pipes/Unix Domain Sockets (recommended)
37
+
38
+
If you're looking for the more feature-rich experience,
39
+
Named Pipes are the way to go.
40
+
They give you all the benefit of the Lanaguge Server Protocol with extra capabilities that you can take advantage of:
41
+
42
+
- The PowerShell Integrated Console
43
+
- Debugging using the [Debug Adapter Protocol](https://microsoft.github.io/debug-adapter-protocol/)
44
+
45
+
The typical command to start PowerShell Editor Services using named pipes is as follows:
The PowerShell Integrated Console uses the host process' Stdio streams for console input and output. Please note that this is mutually exclusive from using Stdio for the language server protocol messages.
69
+
70
+
If you want to take advantage of the PowerShell Integrated Console which automatically shares state with the editor-side,
71
+
you must include the `-EnableConsoleRepl` switch when called `Start-EditorServices.ps1`.
72
+
73
+
This is typically used if your client has the ability to create arbirary terminals in the editor like below:
74
+
75
+

76
+
77
+
The Visual Studio Code, Vim, and IntelliJ extensions currently use the PowerShell Integrated Console.
78
+
79
+
#### Debugging
80
+
81
+
Debugging support is also exposed with PowerShell Editor Services.
82
+
It is handled within the same process as the language server protocol handing.
83
+
This provides a more integrated experience for end users but is something to note as not many other language servers work in this way.
84
+
If you want to take advantage of debugging,
85
+
your client must support the [Debug Adapter Protocol](https://microsoft.github.io/debug-adapter-protocol/).
86
+
Your client should use the path to the debug named pipe found in the `session.json` file talked about above.
87
+
88
+
Currently only the Visual Studio Code extension supports debugging.
89
+
90
+
### Stdio
91
+
92
+
Stdio is a simpler and more universal mechanism when it comes to the Language Server Protocol and is what we recommend if your editor/client doesn't need to support the PowerShell Integrated Console or debugging.
93
+
94
+
> NOTE: Debugging and the Integrated Console are not features of the Stdio channel because each feature requires their own IO streams and since the Stdio model only provides a single set of streams (Stdio),
95
+
> these features cannot be leveraged.
96
+
97
+
The typical command to start PowerShell Editor Services using stdio is as follows:
0 commit comments