Skip to content

Latest commit

 

History

History
82 lines (56 loc) · 2.78 KB

CONTRIBUTING.md

File metadata and controls

82 lines (56 loc) · 2.78 KB

Contributing Guide

Thank you for your interest in contributing to vscode-vba!

Creating Issues

Report bugs or suggest new features.

Before opening an issue, please check that your issue or a similar one has not already been reported in the open issues.

In case it already is, add a reaction and any additional information.

Pull Request Best Practices

  • Discuss bigger changes: For significant changes, please discuss them first , so no effort is wasted.
  • Small and focused PRs: Aim for one feature or bug fix per pull request. This simplifies reviews and accelerates merging

Syntax Highlighting Grammar (Regexes and Scopes)

VS Code uses TextMate Grammars and Oniguruma regexes.

Oniguruma is mostly compatible with PCRE (Comparison), so regexr in PCRE mode is a good choice for development.

For a list of predefined grammar scopes see the TextMate Manual.

To manually inspect the scopes in the editor, execute Developer: Inspect Tokens and Scopes from the command palette (F1).

Unit Tests

Ensure your PR contains tests to cover the feature or bug fix. This prevents regressions and makes reviewing the changes easier by providing a proof of correct functionality.

Tests for the language grammar are in syntaxes/tests/. Run them using:

pnpm run test

Snippets

Adding snippets is as simple as editing snippets/vba_snippets.yml.

Refer to the official documentation for guidance.

Install a development version

To install a development version of the extension, follow these steps:

  1. pnpm run install-dev-ext
  2. Reload the VS Code window:
    • Execute Reload Window from the command palette (F1)

Note: Uninstalling previous versions is not necessary.

Development Environment Setup

Follow these steps to set up your development environment:

  1. Install development tools
    • Node.js >= 18
      • The latest version should work fine
      • Otherwise use NVM for management: nvm install 18 && nvm use 18
    • pnpm: pnpm -v || npm install -g pnpm
  2. Fork and clone the repository https://github.com/serkonda7/vscode-vba
  3. Install dependencies
    cd vscode-vba
    pnpm install
  4. Create a new branch and make your changes