Skip to main content

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

  1. Create a virtual environment

    python -m venv env
    
  2. 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:

  1. Install node dependencies

    npm install
    
  2. 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

  2. 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.

  3. Open the Run and Debug view (ctrl + shift + D)

  4. Select Launch Client and press F5, this will open a second VSCode window with the vscode-playground extension enabled.

  5. You will need to make sure that VSCode is using a virtual environment that contains an installation of pygls. The Python: 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nwscript_language_server-0.5.dev0.tar.gz (9.8 kB view details)

Uploaded Source

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

Hashes for nwscript_language_server-0.5.dev0.tar.gz
Algorithm Hash digest
SHA256 3830b0e402c93b18b1d8806019665d9580dc3e8040c44829bb3e354d18073495
MD5 2d4bded46a21d745d6274fc4ed494cee
BLAKE2b-256 11a60aa941f589400c797c8f4bfa8734dc7e5e3447941a810e34ec95aaee5a5c

See more details on using hashes here.

File details

Details for the file nwscript_language_server-0.5.dev0-py3-none-any.whl.

File metadata

File hashes

Hashes for nwscript_language_server-0.5.dev0-py3-none-any.whl
Algorithm Hash digest
SHA256 659f8c3d1c71011048a6b308aab7630e8f137368b1482d72a4ed66c0df5f26c3
MD5 382bb24c7fe096a29fa3512a22e722c8
BLAKE2b-256 17fba763945fc4ef3d90a3b09cd9a5d63980de6fc80fabf8fcb4f363ca5e01da

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page