Skip to content

Commit d5df6a0

Browse files
authored
Merge pull request #51 from SSlinky/dev
Better icons
2 parents 7d8c73f + 4ccfeb2 commit d5df6a0

17 files changed

+202
-57
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ client/src/syntaxes/dev*
88
.antlr
99
node_modules
1010
client/server
11+
template*
1112
.vscode-test
1213
sample*/**
1314
*.vsix

.vscodeignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ scripts/**
99
**/tsconfig.json
1010
**/tsconfig.base.json
1111
contributing.md
12+
template*
1213

1314
# Development
1415
**/src
@@ -24,6 +25,7 @@ contributing.md
2425
*.tokens
2526
*.vsix
2627
*.tsbuildinfo
28+
*.log
2729

2830
# Samples and testing
2931
sample*/**

README.md

Lines changed: 49 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,66 @@
1-
# VBA Extension for VScode
1+
<p align="center">
2+
<img src="images/vba-lsp-icon.png" alt="drawing" width="128"/>
3+
</p>
24

3-
Adds VBA language support to VSCode via LSP compliant Language Server.
5+
# VBA Pro Extension for VScode
6+
7+
Provides Visual Basic for Applications (VBA) language support in Visual Studio Code using a Language Server Protocol (LSP) compliant backend. We all know that VBA is a dinosaur from the '90s, but it doesn't have to feel like one.
48

59
![VBA LSP](images/vba-lsp.png)
610

711
## Features
812

9-
* Syntax highlighting (resolved on client)
13+
* Syntax highlighting
1014
* Semantic highlighting
1115
* Folding ranges
16+
* Code Snippets
1217
* Document symbols
13-
* Document formatting\*
18+
* Document diagnostics
19+
* Document formatting<sup>1</sup>
20+
21+
<sup>1</sup>Currently full document `Shift+Alt+F` formatting only.
22+
23+
### Syntax Highlighting
24+
25+
The most complete and bug-free TextMate grammar for VBA out there.
26+
27+
### Semantic Highlighting
28+
29+
TextMate does a great job with syntax highlighting but there are some things it can't know. Semantic highlighting is resolved by the language server and helps support where context is required.
30+
31+
### Folding Ranges
32+
33+
Folding ranges help organise code, collapsing things out of the way when you don't need to be looking at them.
34+
35+
### Code Snippets
36+
37+
A small but growing collection of highly useful code snippets. The idea is to keep these to a "rememberable" level, but if there's something you use all the time and you think it's missing, I'd love to hear from you.
38+
39+
### Document Symbols
40+
41+
Document Symbols allow you to view a structured outline of your code in the VSCode Outline view and breadcrumbs. These make it easy to understand and navigate files.
42+
43+
### Document Diagnostics
44+
45+
Displays warnings and errors in the Problems panel, as well as underlining the relevant sections in your code. Only a few diagnostics have been implemented to date, however these will be fleshed out over time.
46+
47+
## Document Formatting
48+
49+
Whole of document formatting is supported with `Shift+Alt+F`. Keeps your code properly indented and easy to read. Also supports half indentation for conditional compilation logic and the complexities that come with it.
1450

15-
\*Currently full document `Shift+Alt+F` formatting only.
51+
```vba
52+
#If VBA7 then
53+
Public Property Get Foo() As LongPtr
54+
#Else
55+
Public Property Get Foo() As Long
56+
#End If
57+
Foo = 0
58+
End Property
59+
```
1660

1761
## Coming Soon
1862

1963
* Hovers
20-
* Diagnostics (info, warnings, and errors)
2164

2265
## Installation
2366

client/src/extension.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,11 @@ export function activate(context: ExtensionContext) {
3939
// Options to control the language client
4040
const clientOptions: LanguageClientOptions = {
4141
// Register the server for plain text documents
42-
documentSelector: [{ scheme: 'file', language: 'vba' }],
42+
documentSelector: [
43+
{ scheme: 'file', language: 'vba-class' },
44+
{ scheme: 'file', language: 'vba-module' },
45+
{ scheme: 'file', language: 'vba-form' }
46+
],
4347
synchronize: {
4448
// Notify the server about file changes to '.clientrc files contained in the workspace
4549
fileEvents: workspace.createFileSystemWatcher('**/.clientrc')

icons/vba_90sGreen_dark.svg

Lines changed: 15 additions & 0 deletions
Loading

icons/vba_90sGreen_light.svg

Lines changed: 15 additions & 0 deletions
Loading

icons/vba_90sPurple_dark.svg

Lines changed: 14 additions & 0 deletions
Loading

icons/vba_90sPurple_light.svg

Lines changed: 21 additions & 0 deletions
Loading

icons/vba_90sYellow_dark.svg

Lines changed: 14 additions & 0 deletions
Loading

icons/vba_90sYellow_light.svg

Lines changed: 15 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)