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
2. Get this tool: `python -m pip install git+https://github.com/microsoft/lsprotocol.git`
13
-
3. Run your plugin: `python -m generator --plugin dotnet --output-dir ./code`
11
+
1. Create a Python environment: `python -m venv .venv`
12
+
> **Note**: Python 3.8 is the minimum supported version
13
+
2. Install this repo's tool: `python -m pip install git+https://github.com/microsoft/lsprotocol.git`
14
+
3. Run your plugin. For example: `python -m generator --plugin dotnet --output-dir ./code`
14
15
15
-
###Command line
16
+
## Command line
16
17
17
-
Clone this repository and run `generator`like a module.
18
+
Clone this repository and run `generator`as a Python module.
18
19
19
20
```console
20
21
>python -m generator --help
@@ -35,27 +36,27 @@ optional arguments:
35
36
Path to a directory where the generated content is
36
37
```
37
38
38
-
### using `nox`
39
+
##Using Nox
39
40
40
-
This project uses `nox` as a task runner to run the code generator. You can install `nox` and run `build_lsp` session to generate code from spec available in the repo.
41
+
This project uses Nox as a task runner to run the code generator. You can install Nox and run a `build_lsp` session to generate code from the spec available in this repo.
41
42
42
43
```console
43
44
> python -m pip install nox
44
45
> nox --session build_lsp
45
46
```
46
47
47
-
You can format code, run tests, and other tasks using`nox` as well.
48
+
You can also use Nox to format code, run tests and run various tasks. Run`nox --list` to see all available tasks.
48
49
49
50
# Contributing plugins
50
51
51
52
## Adding a new plugin
52
53
53
-
Follow these steps to generate boiler plate code for new plugin:
54
+
Follow these steps to generate boilerplate code for a new plugin:
54
55
55
-
1. Create a virtual environment for python using python 3.8 and activate that environment.
56
-
1. If you have python extension for VS Code installed then run `Python: Create Environment` command. Be sure to select all the `requirements.txt` files in the repo. This should, install all packages needed and select the environment for you.
56
+
1. Create a virtual environment for Python using Python >= 3.8 and activate that environment.
57
+
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.
57
58
1. Ensure `nox` is installed.
58
-
1. Run `nox --list`, is nox is installed oyu should see a list of available sessions. Otherwise, run `python -m pip install nox`from the python 3.8 environment you created above.
59
+
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.
59
60
1. Run `nox --session create_plugin` and follow the prompts to create a new plugin.
60
61
61
62
Example:
@@ -71,8 +72,10 @@ nox > Session create_plugin was successful.
0 commit comments