Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add installation guide to VS Code Extension readme #659

Merged
Merged
45 changes: 44 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,53 @@ jobs:
- name: Run tests
run: cargo test --locked ${{ env.MSRV_FEATURES }}

vscode_extension_package:
name: Package vscode extension
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./vscode-extension
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 22.x

- name: Install VS Code extension dependencies
run: npm install

- name: package.json info
id: vsce-info
uses: jaywcjlove/github-action-package@main
with:
path: ./vscode-extension/package.json

- name: "Create VS Code extension package"
id: vsce-package
shell: bash
run: |
BASE_PATH="${{ env.CICD_INTERMEDIATES_DIR }}"
VSCE_NAME=${{ steps.vsce-info.outputs.name }}-v${{ steps.vsce-info.outputs.version }}.vsix
VSCE_PATH="${BASE_PATH}/out/${VSCE_NAME}"
mkdir -p "${BASE_PATH}/out"
npm run vscode:package -- --out="${VSCE_PATH}"
echo "VSCE_NAME=${VSCE_NAME}" >> $GITHUB_OUTPUT
echo "VSCE_PATH=${VSCE_PATH}" >> $GITHUB_OUTPUT

- name: "Artifact upload: VSCode extension"
uses: actions/upload-artifact@master
with:
name: ${{ steps.vsce-package.outputs.VSCE_NAME }}
path: ./vscode-extension/${{ steps.vsce-package.outputs.VSCE_PATH }}

build:
name: ${{ matrix.job.target }} (${{ matrix.job.os }})
runs-on: ${{ matrix.job.os }}
needs: crate_metadata
needs:
- crate_metadata
strategy:
fail-fast: false
matrix:
Expand Down
9 changes: 8 additions & 1 deletion vscode-extension/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,16 @@ The Numbat extension provides language support for the [Numbat](https://github.c
- comment toggling
- autosurrounding brackets

## Installation

To install this extension you will need to download the extension installation file (VSIX file), which can be found in the assets of each [numbat release](https://github.com/sharkdp/numbat/releases) after v1.15.0.
Once the VSIX file has been downloaded, open visual studio code and go to the _Extensions_ tab of the sidebar. Click the three dots in the upper right corner of the tab and chose the _"Install from VSIX..."_ option. Find the VSIX file via the file picker and select it to install it.

![Screenshot of an the open extensions menu with the "Install from VSIX..." option underlined in red](./assets/installation-instruction.png)

## Requirements

_TO BE DONE_
_None_

## Extension Settings

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading