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.6.dev0.tar.gz (11.2 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file nwscript_language_server-0.6.dev0.tar.gz.

File metadata

  • Download URL: nwscript_language_server-0.6.dev0.tar.gz
  • Upload date:
  • Size: 11.2 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.6.dev0.tar.gz
Algorithm Hash digest
SHA256 c7f2defce7447a302bb7c15f211fac464bfa586a967dd4577012bac47c116248
MD5 492e90c1627fb8ac7aa3c08b36c5c623
BLAKE2b-256 717e5412fb0ccc01a1507ce1685c3155e0c187534f5e5f05b5e15a706aa3e280

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nwscript_language_server-0.6.dev0-py3-none-any.whl
Algorithm Hash digest
SHA256 fc6298a5545452889d2994aee4686ac9ed6585d8d0ec51f7b79cf8d188caeb52
MD5 dda49a1ae20b80e318da4ab00c4476e0
BLAKE2b-256 cfb01f7a7303af91d5bedcad79aa37a267f2f1d2361b8beb244b3315e12b45cb

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