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
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
Copy file name to clipboardExpand all lines: README.md
+20-21Lines changed: 20 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ This repository contains packages and tools to generate code for [Language Serve
4
4
5
5
It simplifies the creation of language servers for different programming languages by providing a robust and easy-to-use type generation system.
6
6
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.
8
8
9
9
➡️ For instructions on existing **plugins and packages** for different languages, refer to the table in the [Existing packages/plugins](#existing-packagesplugins) section.
10
10
@@ -15,7 +15,7 @@ It simplifies the creation of language servers for different programming languag
15
15
You will need a Python environment to run the generator. Here are the steps:
16
16
17
17
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
19
19
2. Activate the environment: `.venv\Scripts\activate` (Windows) or `source .venv/bin/activate` (Linux/macOS)
20
20
3. Install this repo's tool: `python -m pip install git+https://github.com/microsoft/lsprotocol.git`
21
21
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.
27
27
For example: `python -m generator --plugin dotnet --output-dir ./code`
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.
41
39
--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.
44
41
--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.
46
45
```
47
46
48
47
## Using Nox
@@ -63,9 +62,9 @@ You can also use Nox to format code, run tests and run various tasks. Run `nox -
63
62
Follow these steps to generate boilerplate code for a new plugin:
64
63
65
64
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.
67
66
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.
69
68
1. Run `nox --session create_plugin` and follow the prompts to create a new plugin.
70
69
71
70
Example:
@@ -83,10 +82,10 @@ nox > Session create_plugin was successful.
83
82
84
83
Below is the list of plugins already created using this package, with their respective package links.
85
84
86
-
| Language | Plugin Module | Package | Status | Documentation |
| Python | generator.plugins.python |[](https://pypi.org/p/lsprotocol)| Active |[Python package README](./packages/python/README.md)|
89
-
| Rust | generator.plugins.rust |[](https://crates.io/crates/lsprotocol)| Active |[Rust package README](./packages/rust/lsprotocol/README.md)|
90
-
| Dotnet | generator.plugins.dotnet | <indevelopment> | Under development | <indevelopment> |
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|
| Python | generator.plugins.python |[](https://pypi.org/p/lsprotocol)| Active |[Python package README](./packages/python/README.md)|
88
+
| Rust | generator.plugins.rust |[](https://crates.io/crates/lsprotocol)| Active |[Rust package README](./packages/rust/lsprotocol/README.md)|
89
+
| Dotnet | generator.plugins.dotnet | <indevelopment> | Under development | <indevelopment>|
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