Skip to content

Contributing Guide

Karthik Nadig edited this page Nov 9, 2023 · 8 revisions

Requirements

You will need the following tools and packages:

  • NodeJs : 18.17.0
  • Npm : 8.13.2
  • python 3.8 : This is needed for bundled libs

Getting the project ready

  • Create virtual environment, activate it, and install packages:

    • python -m pip install nox flake8 black
    • python -m pip install -r src/test/python_tests/requirements.txt
    • nox --session install_bundled_libs
  • Install npm packages by running npm ci

Your project should now be ready to run and debug.

Formatting Server

Most of the linting code is in bundled/tool/lsp_server.py, look in that file for examples on how to work with Language Server Protocol. This file is launched by VS Code, this launch configuration is in src/common/server.ts. These two files are the main files needed for this project to work.

Settings needed for this project are defined in package.json. These settings are generically read and passed to lsp_server.py via language server protocol. Settings are read in src/common/settings.ts and passed to server in src/common/server.ts.

Testing

To test the format server, we have a custom LSP client. See src/test/python_tests/test_formatting.py for examples on how to write tests for this project.

Building Package Locally

To build the VSIX package to install the extension and test locally, run this command npm run package

Clone this wiki locally