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

Update VSCode plugin #1895

Merged
merged 21 commits into from
Jun 9, 2024
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/vscode-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
npm clean-install && \
tsc --build . && \
cd .. && \
npm run gen-syntax && \
npm clean-install && \
npm run build --if-present
- run: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/vscode-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
npm clean-install && \
tsc --build . && \
cd .. && \
npm run gen-syntax && \
npm clean-install && \
npm run build --if-present
- name: Publish to Visual Studio Marketplace
Expand Down
1 change: 1 addition & 0 deletions editors/vscode/.vscodeignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.vscode/**
.vscode-test/**
.gitignore
test/**
DEVELOPING.md
15 changes: 12 additions & 3 deletions editors/vscode/DEVELOPING.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,14 @@

### Updating the syntax highlighting

Whenever swarm language adds new features, the highlighting needs to be updated.
Whenever swarm language adds new features, the highlighting might need to be updated.

To save some time, get the current reserved words by running `swarm-docs`:
```bash
cabal run swarm:swarm-docs -- editors
xsebek marked this conversation as resolved.
Show resolved Hide resolved
```

You still have to add for example types manually.

You still have to add for example type keywords (`rec`, `forall`) manually.

### Add more language features

Expand All @@ -54,9 +53,16 @@ npm install
If you want to include the LSP client then after the previous install do:
```sh
cd client
npm update
npm install
tsc --build
```

To generate the JSON TextMate grammar do:
```sh
npm run gen-syntax
```

To build the VSIX package do:
```sh
vsce package --baseImagesUrl "https://raw.githubusercontent.com/swarm-game/swarm/editors/vscode"
Expand All @@ -76,3 +82,6 @@ Then you may have to update the test snapshot as follows:
```
npm test vscode-tmgrammar-snap -- --updateSnapshot
```

**WARNING:** Always run the snapshot test to see if half of the
syntax is not suddenly missing because of a typo.
Loading
Loading