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.
- Syntax highlighting
- Semantic highlighting
- Folding ranges
- Code Snippets
- Icon theme
- Document symbols
- Document diagnostics
- Document formatting1
1Currently full document Shift+Alt+F
formatting only.
The VBA Pro Extension offers limited support for web environments (e.g. vscode-dev). This includes syntax highlighting and snippets.
The most complete and bug-free TextMate grammar for VBA out there.
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.
Folding ranges help organise code, collapsing things out of the way when you don't need to be looking at them.
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.
VS Code supports two ways of contributing icons.
- Per language identifier. Limited to one icon for all file types.
- Icon pack. Allows more flexibility, however, only one icon theme can be active at any time.
This extension provides both methods. Users with no icon pack installed can use the icon pack provided by this extension to see a visual difference between classes, modules, and forms. Users who prefer to use an alternative icon pack can fall back to the language assigned icon.
Document Symbols allow you to view a structured outline of your code in the VS Code Outline view and breadcrumbs. These make it easy to understand and navigate files.
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.
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.
#If VBA7 then
Public Property Get Foo() As LongPtr
#Else
Public Property Get Foo() As Long
#End If
Foo = 0
End Property
- Hovers
- Through the VS Code Marketplace,
- VS Code command palette
ext install notisdataanalytics.vba-lsp
, or; - Download the visx.
Contributors welcome! Please see contributing.md.