A language server for Bioware's nwscript
Project description
nwscript-lsp
The LSP is built on pygls and rollnw. It is derived from the Pygls Playground and aims, at this point, only to be a tested bed for implementing LSP features. A more robust implementation will come later maybe integrating with nasher.cfg. For now only the current document path will be added to the include path of the script context resman.
That the testbed extension is for vscode is out of simplicity, obviously plugins for any LSP client emacs, (neo)vim, etc will be supported.
Currently, it implements:
- Completions
- Hover
- Workspace Diagnostics
- Document Symbols
- Signature Help
Setup
Install Server Dependencies
Open a terminal in the repository's root directory
-
Create a virtual environment
python -m venv env
-
Install pygls
python -m pip install -r requirements.txt
Install Client Dependencies
Open terminal in the same directory as this file and execute following commands:
-
Install node dependencies
npm install
-
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
-
Open this directory in VS Code
-
The playground relies on the Python extension for VSCode for choosing the appropriate Python environment in which to run the example language servers. If you haven't already, you will need to install it and reload the window.
-
Open the Run and Debug view (
ctrl + shift + D
) -
Select
Launch Client
and pressF5
, this will open a second VSCode window with thevscode-playground
extension enabled. -
You will need to make sure that VSCode is using a virtual environment that contains an installation of
pygls
. ThePython: Select Interpreter
command can be used to pick the correct one.Alternatively, you can set the
pygls.server.pythonPath
option in the.vscode/settings.json
file
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file nwscript_language_server-0.5.dev0.tar.gz
.
File metadata
- Download URL: nwscript_language_server-0.5.dev0.tar.gz
- Upload date:
- Size: 9.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.11.7 Linux/5.15.0-1053-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3830b0e402c93b18b1d8806019665d9580dc3e8040c44829bb3e354d18073495 |
|
MD5 | 2d4bded46a21d745d6274fc4ed494cee |
|
BLAKE2b-256 | 11a60aa941f589400c797c8f4bfa8734dc7e5e3447941a810e34ec95aaee5a5c |
File details
Details for the file nwscript_language_server-0.5.dev0-py3-none-any.whl
.
File metadata
- Download URL: nwscript_language_server-0.5.dev0-py3-none-any.whl
- Upload date:
- Size: 11.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.11.7 Linux/5.15.0-1053-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 659f8c3d1c71011048a6b308aab7630e8f137368b1482d72a4ed66c0df5f26c3 |
|
MD5 | 382bb24c7fe096a29fa3512a22e722c8 |
|
BLAKE2b-256 | 17fba763945fc4ef3d90a3b09cd9a5d63980de6fc80fabf8fcb4f363ca5e01da |