-
-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Rename
json-vscode-extension/
-> vscode-playground
This refactor changes the purpose of the example VSCode extension from integrating a single language server into VSCode to providing a playground in which to experiment with the `pygls` framework in general. Now the extension will - Start the server when the user opens the first text file/notebook - Restart the server if - they change Python environment - change a setting that affects the client/server - trigger it manually via the command palette - save the text file containing the current server's source code Additionally, the following technology upgrades have been performed - Upgrading `vscode-languageclient-node` to `8.1.0` - adding support for the new `v3.17` LSP methods - Using `@vscode/python-extension` to grab the user's currently configured Python environment - rather than forcing them to configure it manually. - Using a `LogOutputChannel` for all client side logging
- Loading branch information
Showing
18 changed files
with
641 additions
and
341 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// A launch configuration that compiles the extension and then opens it inside a new window | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Launch Client", | ||
"type": "extensionHost", | ||
"request": "launch", | ||
"runtimeExecutable": "${execPath}", | ||
"args": [ | ||
"--extensionDevelopmentPath=${workspaceRoot}", | ||
"--folder-uri=${workspaceRoot}/../workspace", | ||
"--folder-uri=${workspaceRoot}/../servers", | ||
], | ||
"outFiles": [ | ||
"${workspaceRoot}/out/**/*.js" | ||
], | ||
// "preLaunchTask": { | ||
// "type": "npm", | ||
// "script": "compile" | ||
// }, | ||
}, | ||
], | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Pygls Playground | ||
|
||
This VSCode extension aims to serve two purposes. | ||
|
||
- Provide an environment in which you can easily experiment with the pygls framework by trying some of our example servers - or by writing your own | ||
|
||
- Provide a minimal example of what it takes to integrate a pygls powered language server into VSCode. | ||
|
||
For an example of a more complete VSCode client, including details on how to bundle your Python code with the VSCode extension itself you may also be interested in Microsoft's [template extension for Python tools](https://github.com/microsoft/vscode-python-tools-extension-template). | ||
|
||
## Setup | ||
|
||
### Install Server Dependencies | ||
|
||
Open a terminal in the repository's root directory | ||
|
||
1. Create a virtual environment | ||
``` | ||
python -m venv env | ||
``` | ||
|
||
1. Install pygls | ||
``` | ||
python -m pip install -e . | ||
``` | ||
|
||
### Install Client Dependencies | ||
|
||
Open terminal in the same directory as this file and execute following commands: | ||
|
||
1. Install node dependencies | ||
|
||
``` | ||
npm install | ||
``` | ||
1. Compile the extension | ||
|
||
``` | ||
npm run compile | ||
``` | ||
Alternatively you can run `npm run watch` if you are going to be actively working on the extension itself. | ||
|
||
### Run Extension | ||
|
||
1. Open this directory in VS Code | ||
1. Open debug view (`ctrl + shift + D`) | ||
1. Select `Launch Client` and press `F5` |
Oops, something went wrong.