Skip to content

Commit fc1d3df

Browse files
authored
Fix README.md links and output, update .vscode/launch.json (#423)
- Corrected section links in `README.md` - Updated incorrect output of `python -m generator --help` in `README.md` - Modified `.vscode/launch.json` to comply with the latest standards
1 parent db068cc commit fc1d3df

File tree

2 files changed

+22
-23
lines changed

2 files changed

+22
-23
lines changed

.vscode/launch.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"configurations": [
44
{
55
"name": "Run Generator",
6-
"type": "python",
6+
"type": "debugpy",
77
"request": "launch",
88
"module": "generator",
99
"console": "integratedTerminal",
@@ -12,7 +12,7 @@
1212
},
1313
{
1414
"name": "DON'T SELECT (test debug config)",
15-
"type": "python",
15+
"type": "debugpy",
1616
"request": "launch",
1717
"console": "integratedTerminal",
1818
"justMyCode": false,

README.md

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This repository contains packages and tools to generate code for [Language Serve
44

55
It simplifies the creation of language servers for different programming languages by providing a robust and easy-to-use type generation system.
66

7-
➡️ For instructions on how to use the **code generator**, refer to the [Usage](#usage) section.
7+
➡️ For instructions on how to use the **code generator**, refer to the [Usage](#code-generator-usage) section.
88

99
➡️ For instructions on existing **plugins and packages** for different languages, refer to the table in the [Existing packages/plugins](#existing-packagesplugins) section.
1010

@@ -15,7 +15,7 @@ It simplifies the creation of language servers for different programming languag
1515
You will need a Python environment to run the generator. Here are the steps:
1616

1717
1. Create a Python environment: `python -m venv .venv`
18-
> **Note**: Python 3.8 is the minimum supported version
18+
> **Note**: Python 3.8 is the minimum supported version
1919
2. Activate the environment: `.venv\Scripts\activate` (Windows) or `source .venv/bin/activate` (Linux/macOS)
2020
3. Install this repo's tool: `python -m pip install git+https://github.com/microsoft/lsprotocol.git`
2121
4. Run your plugin. You can use the [command line](#command-line) or [Nox](#using-nox) to run the generator.
@@ -27,22 +27,21 @@ Clone this repository and run `generator` as a Python module.
2727
For example: `python -m generator --plugin dotnet --output-dir ./code`
2828

2929
```console
30-
>python -m generator --help
31-
usage: __main__.py [-h] [--model [MODEL [MODEL ...]]] --plugin PLUGIN
32-
[--output-dir OUTPUT_DIR]
30+
> python -m generator --help
31+
usage: __main__.py [-h] [--model [MODEL ...]] --plugin PLUGIN [--output-dir OUTPUT_DIR] [--test-dir TEST_DIR]
3332

3433
Generate types from LSP JSON model.
3534

36-
optional arguments:
35+
options:
3736
-h, --help show this help message and exit
38-
--model [MODEL [MODEL ...]], -m [MODEL [MODEL ...]]
39-
Path to a model JSON file. By default uses packaged
40-
model file.
37+
--model [MODEL ...], -m [MODEL ...]
38+
Path to a model JSON file. By default uses packaged model file.
4139
--plugin PLUGIN, -p PLUGIN
42-
Name of a builtin plugin module. By default uses all
43-
plugins.
40+
Name of a builtin plugin module. By default uses all plugins.
4441
--output-dir OUTPUT_DIR, -o OUTPUT_DIR
45-
Path to a directory where the generated content is
42+
Path to a directory where the generated content is written.
43+
--test-dir TEST_DIR, -t TEST_DIR
44+
Path to a directory where the generated tests are written.
4645
```
4746

4847
## Using Nox
@@ -63,9 +62,9 @@ You can also use Nox to format code, run tests and run various tasks. Run `nox -
6362
Follow these steps to generate boilerplate code for a new plugin:
6463

6564
1. Create a virtual environment for Python using Python >= 3.8 and activate that environment.
66-
1. If you are using the Python extension for VS Code, you can just run the **Python: Create Environment** command from the Command Palette. Be sure to select all the `requirements.txt` files in the repo. This command will install all packages needed and select the newly created environment for you.
65+
1. If you are using the Python extension for VS Code, you can just run the **Python: Create Environment** command from the Command Palette. Be sure to select all the `requirements.txt` files in the repo. This command will install all packages needed and select the newly created environment for you.
6766
1. Ensure `nox` is installed.
68-
1. Run `nox --list` in the terminal. If Nox is installed, you should see a list of all available sessions. Otherwise, run `python -m pip install nox` in the activated environment you created above.
67+
1. Run `nox --list` in the terminal. If Nox is installed, you should see a list of all available sessions. Otherwise, run `python -m pip install nox` in the activated environment you created above.
6968
1. Run `nox --session create_plugin` and follow the prompts to create a new plugin.
7069

7170
Example:
@@ -83,10 +82,10 @@ nox > Session create_plugin was successful.
8382

8483
Below is the list of plugins already created using this package, with their respective package links.
8584

86-
| Language | Plugin Module | Package | Status | Documentation |
87-
| ---------------- | ------------------------ | --------------------------------------------------------------------------------------------------- | ----------------- | ----------------------------------------------------------- |
88-
| Python | generator.plugins.python | [![PyPI](https://img.shields.io/pypi/v/lsprotocol?label=lsprotocol)](https://pypi.org/p/lsprotocol) | Active | [Python package README](./packages/python/README.md) |
89-
| Rust | generator.plugins.rust | [![Crates](https://img.shields.io/crates/v/lsprotocol)](https://crates.io/crates/lsprotocol) | Active | [Rust package README](./packages/rust/lsprotocol/README.md) |
90-
| Dotnet | generator.plugins.dotnet | <in development> | Under development | <in development> |
91-
| Crystal | | [nobodywasishere/lsprotocol-crystal](https://github.com/nobodywasishere/lsprotocol-crystal) | Active | [CrystalDoc.info](https://crystaldoc.info/github/nobodywasishere/lsprotocol-crystal/main/index.html) |
92-
| Golang | | [myleshyson/lsprotocol-go](https://github.com/myleshyson/lsprotocol-go) | Active | [myleshyson/lsprotocol-go](https://github.com/myleshyson/lsprotocol-go) |
85+
| Language | Plugin Module | Package | Status | Documentation |
86+
| -------- | ------------------------ | --------------------------------------------------------------------------------------------------- | ----------------- | ---------------------------------------------------------------------------------------------------- |
87+
| Python | generator.plugins.python | [![PyPI](https://img.shields.io/pypi/v/lsprotocol?label=lsprotocol)](https://pypi.org/p/lsprotocol) | Active | [Python package README](./packages/python/README.md) |
88+
| Rust | generator.plugins.rust | [![Crates](https://img.shields.io/crates/v/lsprotocol)](https://crates.io/crates/lsprotocol) | Active | [Rust package README](./packages/rust/lsprotocol/README.md) |
89+
| Dotnet | generator.plugins.dotnet | <in development> | Under development | <in development> |
90+
| Crystal | | [nobodywasishere/lsprotocol-crystal](https://github.com/nobodywasishere/lsprotocol-crystal) | Active | [CrystalDoc.info](https://crystaldoc.info/github/nobodywasishere/lsprotocol-crystal/main/index.html) |
91+
| Golang | | [myleshyson/lsprotocol-go](https://github.com/myleshyson/lsprotocol-go) | Active | [myleshyson/lsprotocol-go](https://github.com/myleshyson/lsprotocol-go) |

0 commit comments

Comments
 (0)