Skip to content

Commit 1db0c37

Browse files
authored
improve icon, docs and CI; require VS Code >= 1.82 (#110)
1 parent f62b238 commit 1db0c37

File tree

13 files changed

+136
-269
lines changed

13 files changed

+136
-269
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- uses: actions/checkout@v4
1717
- uses: actions/setup-node@v4
1818
with:
19-
node-version: 16.x
19+
node-version: 18.x
2020
- uses: pnpm/action-setup@v2
2121
with:
2222
version: 8
@@ -33,7 +33,7 @@ jobs:
3333
- uses: actions/checkout@v4
3434
- uses: actions/setup-node@v4
3535
with:
36-
node-version: 16.x
36+
node-version: 18.x
3737
- uses: pnpm/action-setup@v2
3838
with:
3939
version: 8
@@ -47,11 +47,12 @@ jobs:
4747
- name: Package
4848
run: pnpm run package
4949

50-
- name: Create Release
50+
- name: Upload artifact
5151
if: startsWith(github.ref, 'refs/tags/')
52-
uses: softprops/action-gh-release@v1
52+
uses: actions/upload-artifact@v4
5353
with:
54-
files: vscode-vba-0.*.*.vsix
54+
name: vba.vsix
55+
path: vscode-vba-0.*.*.vsix
5556

5657

5758
publish:
@@ -61,26 +62,26 @@ jobs:
6162
if: startsWith(github.ref, 'refs/tags/')
6263
runs-on: ubuntu-latest
6364
steps:
64-
- uses: actions/checkout@v4
65-
- uses: actions/setup-node@v4
66-
with:
67-
node-version: 16.x
68-
- uses: pnpm/action-setup@v2
65+
- name: Download artifact
66+
uses: actions/download-artifact@v4
67+
68+
- name: Create Release
69+
uses: softprops/action-gh-release@v1
6970
with:
70-
version: 8
71-
- uses: bait-lang/setup-bait@main
72-
- name: Install dependencies
73-
run: pnpm install --frozen-lockfile
71+
files: vba.vsix
7472

75-
- name: Publish to VS Code Marketplace
73+
- id: publish_to_marketplace
74+
name: Publish to VS Code Marketplace
7675
if: always()
7776
uses: HaaLeo/publish-vscode-extension@v1
7877
with:
7978
pat: ${{ secrets.VSCE_PAT }}
8079
registryUrl: https://marketplace.visualstudio.com
80+
extensionFile: vba.vsix
8181

8282
- name: Publish to Open VSX Registry
8383
if: always()
8484
uses: HaaLeo/publish-vscode-extension@v1
8585
with:
8686
pat: ${{ secrets.OPEN_VSX_PAT }}
87+
extensionFile: vba.vsix

.github/workflows/image-actions.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

.vscodeignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
!out/*.js
99
!out/*.json
1010

11-
!images/icon_256x256.png
11+
!images/icon.png
1212

1313
!README.md
1414
!LICENSE.txt

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
# Changelog
2+
## 0.9.7
3+
_unreleased_
4+
5+
- Add snippets related to `If-Else`, `Sub` and `Function`
6+
- Change icon to match GitHub Explore
7+
- Improve documentation
8+
- Code refactorings
9+
10+
211
## 0.9.6
312
_2024-02-02_
413

CONTRIBUTING.md

Lines changed: 50 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,84 @@
11
# Contributing Guide
2-
Thanks for your interest in improving vscode-vba!
2+
Thank you for your interest in contributing to vscode-vba!
33

44

55
## Creating Issues
66
Report bugs or suggest new features.
77

8-
Before opening a issue, please first search in [open issues][issues] to check it is not already reported.
8+
Before opening an issue, please check that your issue or a similar one has not already been reported in the [open issues][issues].
99

10-
In case your issue already exists, add a reaction and if possible, comment with further information.
10+
In case it already is, add a reaction and any additional information.
1111

1212

13-
## Creating Pull Requests
14-
> Before making bigger changes, please discuss them in an issue.
13+
## Pull Request Best Practices
14+
- **Discuss bigger changes:** For significant changes, please discuss them first , so no effort is wasted.
15+
- **Small and focused PRs:** Aim for one feature or bug fix per pull request. This simplifies reviews and accelerates merging
1516

16-
In general PRs should be kept as small as possible (e.g. one feature/fix per PR).
17-
It allows merging them faster with less conflicts and will reduce review time.
1817

18+
## Syntax Highlighting Grammar (Regexes and Scopes)
19+
VS Code uses TextMate Grammars and Oniguruma regexes.
1920

20-
### Repository Setup
21-
- Install the Bait programming language: https://github.com/bait-lang/bait#building-from-source
22-
- Create and clone a fork of https://github.com/serkonda7/vscode-vba
23-
- Run `pnpm install` inside the cloned directory
24-
- Create a new working branch for your changes
21+
Oniguruma is mostly compatible with PCRE _([Comparison][oniguruma-overview])_,
22+
so [regexr][regexr] in PCRE mode is a good choice for development.
2523

24+
For a list of predefined grammar scopes see the [TextMate Manual][textmate-manual].
2625

27-
## Regexes and TextMate Scopes (Syntax Highlighting)
28-
TextMate uses Oniguruma regexes which are mostly compatible with PCRE ([Compariosn][oniguruma-overview]).
29-
A good tool to test these regexes is https://regexr.com/ in PCRE mode.
30-
31-
For a list of predefined scopes see https://macromates.com/manual/en/language_grammars#naming_conventions.
26+
To manually inspect the scopes in the editor,
27+
execute `Developer: Inspect Tokens and Scopes` from the command palette (<kbd>F1</kbd>).
3228

3329

3430
### Unit Tests
35-
Every PR should contain a test case that covers the added feature or bug fix.
31+
Ensure your PR contains tests to cover the feature or bug fix.
3632
This prevents regressions and makes reviewing the changes easier by providing a proof of correct functionality.
3733

38-
Tests for the language grammar (syntax highlighting) are in [`syntaxes/tests`](syntaxes/tests/).
39-
They can be run with the following command:
34+
Tests for the language grammar are in [`syntaxes/tests/`](syntaxes/tests/).
35+
Run them using:
4036
```
4137
pnpm run test
4238
```
4339

4440

45-
### Install a dev version
46-
If you'd like to install a development version of the extension, follow these steps:
41+
## Snippets
42+
Adding snippets is as simple as editing [`snippets/vba_snippets.yml`](snippets/vba_snippets.yml).
43+
44+
Refer to the [official documentation][docs-snippets] for guidance.
45+
46+
47+
## Install a development version
48+
To install a development version of the extension, follow these steps:
4749
1. ```sh
4850
pnpm run install-dev-ext
4951
```
5052
2. Reload the VS Code window:
51-
- Open command palette (<kbd>F1</kbd>)
52-
- Run `>reload window`
53+
- Execute `Reload Window` from the command palette (<kbd>F1</kbd>)
54+
55+
> Note: Uninstalling previous versions is not necessary.
5356
54-
> Note: It is not required to uninstall any previous versions.
57+
58+
## Development Environment Setup
59+
Follow these steps to set up your development environment:
60+
61+
1. Install development tools
62+
- [Node.js](https://nodejs.org/) >= 18
63+
- The latest version should work fine
64+
- Otherwise use [NVM][nvm] for management: `nvm install 18 && nvm use 18`
65+
- [pnpm](https://pnpm.io/): `pnpm -v || npm install -g pnpm`
66+
- Bait programming language: [Installation guide][bait]
67+
2. Fork and clone the repository https://github.com/serkonda7/vscode-vba
68+
3. Install dependencies
69+
```sh
70+
cd vscode-vba
71+
pnpm install
72+
```
73+
4. Create a new branch and make your changes
5574

5675

5776
<!-- links -->
5877
[issues]: https://github.com/serkonda7/vscode-vba/issues
5978
[oniguruma-overview]: https://rbuckton.github.io/regexp-features/engines/oniguruma.html
79+
[regexr]: https://regexr.com/
80+
[textmate-manual]: https://macromates.com/manual/en/language_grammars#naming_conventions
81+
[docs-snippets]: https://code.visualstudio.com/docs/editor/userdefinedsnippets#_create-your-own-snippets
82+
83+
[nvm]: https://github.com/nvm-sh/nvm
84+
[bait]: https://github.com/bait-lang/bait#installation

README.md

Lines changed: 32 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,56 @@
1-
<img align="left" width=110 src="images/icon_256x256.png">
1+
<div align="center">
2+
3+
<img width="120" src="images/icon.png">
4+
<h1>VBA Support for VS Code</h1>
25

3-
# VBA Support for VS Code
46
[![CI][ci-badge]][ci-status]
57
[![Marketplace Installs][badge-installs-market]][vs-marketplace]
68
[![Open VSX Installs][badge-installs-vsx]][open-vsx]
7-
---
9+
[![Sponsor on GitHub][sponsors-badge]][sponsors-profile]
810

9-
> Also used by [GitHub Linguist][gh-linguist]!
11+
</div>
1012

1113
## Key Features
12-
- Syntax highlighting:
13-
- Visual Basic for Applications (VBA)
14-
- WinWrap Basic (WWB)
14+
> Used for [GitHub syntax highlighting][gh-linguist]
15+
16+
- VBA syntax highlighting
1517
- 🚧 Export and Import of Macros for Office Documents
16-
- 🚧 Comprehensive snippets
18+
- Comprehensive snippets
19+
- Syntax highlighting for some dialects _(community maintained)_
20+
- WinWrap Basic (WWB)
1721

1822

1923
## Installation
20-
Launch the command palette (<kbd>Ctrl</kbd>+<kbd>P</kbd>) and run
21-
`ext install serkonda7.vscode-vba`.
24+
Launch Quick Open (<kbd>Ctrl</kbd>+<kbd>P</kbd>) and execute this command:
25+
```
26+
ext install serkonda7.vscode-vba
27+
```
2228

23-
The extension is also available on [Open VSX][open-vsx].
29+
Or download from [Open VSX][open-vsx].
2430

2531

2632
## Contributing
27-
Thank you in advance, any contributions are highly appreciated!
33+
Your contributions are always welcome and highly appreciated!
2834

29-
- Questions can be asked in [Discussions][discussions]
30-
- For creating issues or pull requests, please see [CONTRIBUTING.md](CONTRIBUTING.md)
31-
- Or make a donation to support the development of new features:
35+
- **Discuss and Ask Questions:** [GitHub Discussions][discussions] with community support
36+
- **Report Issues or Submit Changes:** Please check the [Contribution guidelines](CONTRIBUTING.md)
37+
- **Support the Development** Consider making a donation to help us develop new features:
3238
[![Sponsor on GitHub][sponsors-badge]][sponsors-profile]
3339

3440

41+
## Snippets
42+
The following snippets are available:
43+
- `If`
44+
- `ElseIf`
45+
- `Else`
46+
- `Sub`
47+
- `Function`
48+
49+
3550
## License
36-
Source code and grammars are licensed under the [Mozilla Public License (MPL-2.0)](LICENSE.txt).
51+
Source code, grammars and snippets are provided under the [Mozilla Public License (MPL-2.0)](LICENSE.txt).
3752

38-
The icon is licensed under the [Creative Commons ShareAlike](images/LICENSE) license.
53+
The icon is provided under [CC-BY-4.0](images/LICENSE.txt), courtesy of the GitHub Explore authors.
3954

4055

4156
<!-- links -->

images/LICENSE

Lines changed: 0 additions & 9 deletions
This file was deleted.

images/LICENSE.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Creative Commons Attribution 4.0 International
2+
3+
Copyright (c) GitHub Explore content authors
4+
5+
For details and to obtain the full license text, please visit
6+
https://creativecommons.org/licenses/by/4.0/deed.en
7+
8+
9+
icon.png is based on https://github.com/github/explore

images/icon.png

26.1 KB
Loading

0 commit comments

Comments
 (0)