Skip to content

Commit 0e156e2

Browse files
authored
Merge pull request #355 from puppetlabs/CAT-1336-Readme_updates
(CAT-1336) - Update README
2 parents d68eab4 + 57b4adc commit 0e156e2

File tree

1 file changed

+27
-21
lines changed

1 file changed

+27
-21
lines changed

README.md

Lines changed: 27 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
![ci](https://github.com/puppetlabs/puppet-editor-services/actions/workflows/ci.yml/badge.svg)
55
![GitHub release (latest by date)](https://img.shields.io/github/v/release/puppetlabs/puppet-editor-services)
66

7-
A ruby based implementation of a [Language Server](https://github.com/Microsoft/language-server-protocol) and [Debug Server](TODO) for the Puppet Language.
7+
A ruby based implementation of a [Language Server](https://github.com/Microsoft/language-server-protocol) and [Debug Server](https://github.com/microsoft/debug-adapter-protocol) for the Puppet Language. Integrate this into your editor to benefit from full Puppet Language support, such as syntax hightlighting, linting, hover support and more.
88

99
## Requirements
1010

@@ -20,23 +20,23 @@ A ruby based implementation of a [Language Server](https://github.com/Microsoft/
2020

2121
* Clone this repository
2222

23-
```
23+
```bash
2424
> git clone https://github.com/puppetlabs/puppet-editor-services.git
2525

2626
> cd puppet-editor-services
2727
```
2828

2929
* Bundle the development gems
3030

31-
```
31+
```bash
3232
> bundle install
3333

3434
... < lots of text >
3535
```
3636

3737
* Installed vendored gems
3838

39-
```
39+
```bash
4040
> bundle exec rake gem_revendor
4141

4242
... < lots of text >
@@ -48,7 +48,7 @@ A ruby based implementation of a [Language Server](https://github.com/Microsoft/
4848

4949
By default the language server will stop if no connection is made within 10 seconds and will also stop after a client disconnects. Adding `--debug=stdout` will log messages to the console
5050

51-
```
51+
```bash
5252
> bundle exec ruby ./puppet-languageserver --debug=stdout
5353
I, [2018-12-05T15:19:51.853802 #28756] INFO -- : Language Server is v0.16.0
5454
I, [2018-12-05T15:19:51.854809 #28756] INFO -- : Using Puppet v5.5.8
@@ -89,7 +89,7 @@ I, [2018-12-05T15:20:03.632011 #28756] INFO -- : Language Server exited.
8989
9090
To make the server run continuously add `--timeout=0` and `--no-stop` to the command line. For example;
9191
92-
```
92+
```bash
9393
> bundle exec ruby ./puppet-languageserver --debug=stdout --timeout=0 --no-stop
9494
I, [2018-12-05T15:20:56.302414 #29752] INFO -- : Language Server is v0.16.0
9595
I, [2018-12-05T15:20:56.303391 #29752] INFO -- : Using Puppet v5.5.8
@@ -122,7 +122,7 @@ D, [2018-12-05T15:20:56.374333 #29752] DEBUG -- : TCPSRV: Started listening on l
122122
123123
> On Windows you need to run ruby with the `Puppet Command Prompt` which can be found in the Start Menu. This enables the Puppet Agent ruby environment.
124124
125-
```
125+
```bash
126126
> ruby puppet-languageserver
127127
LANGUAGE SERVER RUNNING 127.0.0.1:55086
128128
```
@@ -131,15 +131,15 @@ LANGUAGE SERVER RUNNING 127.0.0.1:55086
131131
132132
Note that the Language Server will use TCP as the default transport on `localhost` at a random port. The IP Address and Port can be changed using the `--ip` and `--port` arguments respectively. For example to listen on all interfaces on port 9000;
133133
134-
```
134+
```bash
135135
> ruby ./puppet-languageserver --ip=0.0.0.0 --port=9000
136136
```
137137
138138
To change the protocol to STDIO, that is using STDOUT and STDIN, use the `--stdio` argument.
139139
140140
## Command line arguments
141141
142-
```
142+
```bash
143143
Usage: puppet-languageserver.rb [options]
144144
-p, --port=PORT TCP Port to listen on. Default is random port
145145
-i, --ip=ADDRESS IP Address to listen on (0.0.0.0 for all interfaces). Default is localhost
@@ -174,21 +174,21 @@ Note that using the `--debug=STDOUT` option without directing the output to a te
174174
175175
The `noop` action just outputs an empty JSON array but can be used to confirm that the Sidecar does not error while loading Puppet.
176176
177-
```
177+
```bash
178178
> bundle exec ruby ./puppet-languageserver-sidecar --action=noop
179179
[]
180180
```
181181
182182
#### Output all default Puppet Types
183183
184-
```
184+
```bash
185185
> bundle exec ruby ./puppet-languageserver-sidecar --action=default_types
186186
[{"key":"anchor","calling_source":"puppet/cache/lib/puppet/type/anchor.rb","sou ...
187187
```
188188
189189
#### Output all default Puppet Functions with a different puppet configuration, and debug information
190190
191-
```
191+
```bash
192192
> bundle exec ruby ./puppet-languageserver-sidecar --action=default_types --puppet-settings=--vardir,./test/vardir,--confdir,./test/confdir --debug=STDOUT
193193
I, [2018-12-05T15:42:56.679837 #51864] INFO -- : Language Server Sidecar is v0.16.0
194194
I, [2018-12-05T15:42:56.679837 #51864] INFO -- : Using Puppet v5.5.8
@@ -201,14 +201,14 @@ D, [2018-12-05T15:42:56.752804 #51864] DEBUG -- : [PuppetLanguageServerSidecar::
201201
202202
#### Output all Puppet Classes in a workspace directory
203203
204-
```
204+
```bash
205205
> bundle exec ruby ./puppet-languageserver-sidecar --action=workspace_classes --local-workspace=C:\source\puppetlabs-sqlserver
206206
[{"key":"sqlserver::config","calling_source":"C:/Source/puppetlabs-sqlserver/manifests/config.pp","source":"C:/Source/puppetlabs-sqlserver/manifests/config.pp","line":25,"ch...
207207
```
208208
209209
## Command line arguments
210210
211-
```
211+
```bash
212212
Usage: puppet-languageserver-sidecar.rb [options]
213213
-a, --action=NAME The action for the sidecar to take. Expected ["noop", "default_classes", "default_functions", "default_types", "node_graph", "resource_list", "workspace_classes", "workspace_functions", "workspace_types"]
214214
-c, --action-parameters=JSON JSON Encoded string containing the parameters for the sidecar action
@@ -222,14 +222,13 @@ Usage: puppet-languageserver-sidecar.rb [options]
222222
-v, --version Prints the Langauge Server version
223223
```
224224
225-
226225
# Debug Server
227226
228227
## How to run the Debug Server for Development
229228
230-
By default the language server will stop if no connection is made within 10 seconds and will also stop after a client disconnects. Adding `--debug=stdout` will log messages to the console
229+
By default the debug server will stop if no connection is made within 10 seconds and will also stop after a client disconnects. Adding `--debug=stdout` will log messages to the console
231230
232-
```
231+
```bash
233232
> bundle exec ruby ./puppet-debugserver --debug=stdout
234233
I, [2018-04-17T14:19:24.131869 #6940] INFO -- : Debug Server is v0.10.0
235234
I, [2018-04-17T14:19:24.132871 #6940] INFO -- : Starting RPC Server...
@@ -249,7 +248,7 @@ I, [2018-04-17T14:19:34.150402 #6940] INFO -- : Debug Server exited.
249248
250249
To make the server run continuously add `--timeout=0` to the command line. For example;
251250
252-
```
251+
```bash
253252
> bundle exec ruby ./puppet-debugserver --debug=stdout --timeout=0
254253
I, [2018-04-17T14:21:10.542332 #12424] INFO -- : Debug Server is v0.10.0
255254
I, [2018-04-17T14:21:10.543334 #12424] INFO -- : Starting RPC Server...
@@ -267,12 +266,11 @@ D, [2018-04-17T14:21:10.546834 #12424] DEBUG -- : TCPSRV: Started listening on 1
267266
* [Windows](https://puppet.com/docs/puppet/latest/install_agents.html#install_windows_agents)
268267
* [macOS](https://puppet.com/docs/puppet/latest/install_agents.html#install_mac_agents)
269268
270-
271269
* Run the `puppet-debugserver` with ruby
272270
273271
> On Windows you need to run ruby with the `Puppet Command Prompt` which can be found in the Start Menu. This enables the Puppet Agent ruby environment.
274272
275-
```
273+
```bash
276274
> ruby puppet-debugserver
277275
DEBUG SERVER RUNNING 127.0.0.1:8082
278276
```
@@ -281,7 +279,7 @@ Note the debug server will stop after 10 seconds if no client connection is made
281279
282280
## Command line arguments
283281
284-
```
282+
```bash
285283
Usage: puppet-debugserver.rb [options]
286284
-p, --port=PORT TCP Port to listen on. Default is random port}
287285
-i, --ip=ADDRESS IP Address to listen on (0.0.0.0 for all interfaces). Default is localhost
@@ -297,6 +295,14 @@ This codebase is licensed under Apache 2.0. However, the open source dependencie
297295
298296
# Other information
299297
298+
## Reporting bugs
299+
300+
If you find a bug in puppet-editor-services or its results, please create an issue in the [repo issues tracker](https://github.com/puppetlabs/puppet-editor-services/issues). Bonus points will be awarded if you also include a patch that fixes the issue.
301+
302+
## Development
303+
304+
If you run into an issue with this tool or would like to request a feature you can raise a PR with your suggested changes. Alternatively, you can raise a Github issue with a feature request or to report any bugs. Every other Tuesday the DevX team holds office hours in the Puppet Community Slack, where you can ask questions about this and any other supported tools. This session runs at 15:00 (GMT) for about an hour.
305+
300306
## Why are there vendored gems and why only native ruby
301307
302308
When used by editors this language server will be running using the Ruby runtime provided by Puppet Agent. That means no native extensions and no bundler. Also, only the gems provided by Puppet Agent would be available by default. To work around this limitation all runtime dependencies should be re-vendored and then the load path modified appropriately.

0 commit comments

Comments
 (0)