Skip to content

Commit ba8b420

Browse files
authored
Edit stdio section (#2336)
- Reword - Add command including all required parameters - Add additional tips to set up PSES in some editors
1 parent f813cdf commit ba8b420

1 file changed

Lines changed: 30 additions & 8 deletions

File tree

README.md

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,36 @@ The Visual Studio Code, Vim, Neovim, and IntelliJ extensions use named pipes.
6868

6969
### Standard Input and Output
7070

71-
Alternatively, the `-SessionDetailsPath ./session.json` argument can be replaced with just `-Stdio`.
72-
The use of stdio is the _simplest_ way to connect with most LSP clients,
73-
but will limit some features, such as the debugger and Extension Terminal.
74-
This is because because these two features require their own IO streams and stdio only provides a single pair of streams.
75-
76-
Please see the [emacs-simple-test.el](test/emacs-simple-test.el),
77-
[emacs-test.el](test/emacs-test.el),
78-
[vim-simple-test.vim](test/vim-simple-test.vim) and [vim-test.vim](test/vim-test.vim) for examples of end-to-end tested configurations.
71+
Connecting to PSES over standard input and output (stdio) is the simplest option in most LSP clients.
72+
73+
> [!NOTE]
74+
> Some features are not available over stdio, such as the debugger and Extension
75+
> Terminal, because they require their own IO streams and stdio provides a single
76+
> pair of streams.
77+
78+
Use PSES over stdio as follows:
79+
80+
```powershell
81+
pwsh -NoLogo -NoProfile -Command "./PowerShellEditorServices/Start-EditorServices.ps1 -Stdio -LogLevel Error"
82+
```
83+
84+
> [!IMPORTANT]
85+
> Adjust the path to `Start-EditorServices.ps1` as needed. The command above assumes
86+
> that the current directory is set to the folder where you expanded the PSES ZIP
87+
> archive to.
88+
>
89+
> Depending on your editor, set the environment variables `NO_COLOR` and `TERM`
90+
> before issuing the command above to improve the readability of any error messages
91+
> `pwsh` may output. See [Disabling ANSI Output](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_ansi_terminals#disabling-ansi-output)
92+
> for more details.
93+
94+
For examples of tested end-to-end configurations, see:
95+
96+
- [emacs-simple-test.el](test/emacs-simple-test.el)
97+
- [emacs-test.el](test/emacs-test.el)
98+
- [vim-simple-test.vim](test/vim-simple-test.vim)
99+
- [vim-test.vim](test/vim-test.vim)
100+
79101
They use [eglot for Emacs](https://github.com/joaotavora/eglot) and [LanguageClient-neovim](https://github.com/autozimu/LanguageClient-neovim).
80102

81103
### Advanced Usage

0 commit comments

Comments
 (0)