|
1 | | -# VBA Extension for VScode |
| 1 | +<p align="center"> |
| 2 | + <img src="images/vba-lsp-icon.png" alt="drawing" width="128"/> |
| 3 | +</p> |
2 | 4 |
|
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. |
4 | 8 |
|
5 | 9 |  |
6 | 10 |
|
7 | 11 | ## Features |
8 | 12 |
|
9 | | -* Syntax highlighting (resolved on client) |
| 13 | +* Syntax highlighting |
10 | 14 | * Semantic highlighting |
11 | 15 | * Folding ranges |
| 16 | +* Code Snippets |
12 | 17 | * 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. |
14 | 50 |
|
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 | +``` |
16 | 60 |
|
17 | 61 | ## Coming Soon |
18 | 62 |
|
19 | 63 | * Hovers |
20 | | -* Diagnostics (info, warnings, and errors) |
21 | 64 |
|
22 | 65 | ## Installation |
23 | 66 |
|
|
0 commit comments