Visual Basic Language Server
A modern, fast, and feature-rich Visual Basic .NET language server extension for Visual Studio Code, powered by the Microsoft Roslyn compiler platform.
Bring first-class VB.NET development to VS Code with full IntelliSense, semantic highlighting, compiler diagnostics, native Roslyn code fixes, smart block completions, and seamless project navigation.
Features
⚡ Intelligent Autocompletion & Imports
- Context-Aware Completions: Accurate suggestions for types, methods, properties, fields, enum members, and constants.
- Smart Type Preselection: Preselects expected types when typing
New expressions in argument lists, object initializers, and variable assignments.
- Auto-Imports: Seamlessly suggests types from unimported namespaces with automatic
Imports generation on completion.
- Preprocessor Completions: Full support for
#Const, #If, #Region, and other directives.
🎨 Semantic & Syntax Highlighting
- Rich Semantic Coloring: Distinguishes types, methods, properties, global fields, enum members, and constants based on deep Roslyn compiler analysis.
- Theme-Compatible: Uses standard TextMate scopes and LSP semantic token legends so your favorite VS Code color themes look natural.
🔍 Diagnostics & Roslyn Quick Fixes
- Live Compiler Diagnostics: Real-time error and warning reporting as you type.
- Flow-Aware Null Checking: Proactive warnings when dereferencing values that are known to be
Nothing.
- Roslyn Code Fixes: Quick-fix lightbulb actions for missing block terminators, framework imports, name corrections, and common syntax fixes.
🧭 Navigation & Code Intelligence
- Go to Definition: Jump directly to declarations and implementations across open and project-indexed VB files.
- Find All References: Locate every usage of symbols across your workspace.
- Hover Documentation: View Roslyn XML doc summaries, type signatures, and direct links to official Microsoft .NET API documentation.
- Signature Help: Interactive parameter hints, overload lists, and documentation while typing method, constructor, and indexer arguments.
- Document Symbols & Outline: Navigate types, methods, properties, and fields easily via the VS Code outline pane and breadcrumbs.
- Document Formatting: Clean, Roslyn-standard code formatting on demand.
✍️ Smart Editing & Productivity
- Block Header Auto-Closing: Pressing Enter on block headers (
Sub, Function, Class, Module, Property, If, Try, While, For, etc.) automatically generates the matching End ... closer with correct indentation.
- Automatic
Then Insertion: Pressing Enter on an If statement automatically appends Then and opens the block.
- Keyword Auto-Casing: Automatically normalizes keywords and built-in primitive types to canonical casing (e.g.,
sub $\rightarrow$ Sub, integer $\rightarrow$ Integer).
📦 Workspace & Project Integration
- Automatic Reference Discovery: Reads dependencies and metadata references directly from restored
.vbproj, .csproj, and project.assets.json files.
- Background Project Indexing: Indexes project source files for instant symbol discovery even when files are not actively open.
Configuration Settings
You can customize the extension via your VS Code Settings (Cmd+, / Ctrl+,):
| Setting |
Default |
Description |
vbnet.autoKeywordCase |
true |
Automatically corrects VB.NET keyword and built-in type casing while typing. |
vbnet.autoInsertThen |
true |
Automatically inserts Then when pressing Enter on an If statement. |
Requirements
- Visual Studio Code
1.85.0 or later.
- .NET 10 Runtime installed and available as
dotnet on your PATH.
Note: The .NET SDK is not required for running the extension—only the standard .NET 10 Runtime.
Development & Packaging
To build and package the extension locally:
- Clone the repository and install dependencies:
npm install
- Build the extension bundle and language server:
npm run vscode:prepublish
- Generate a
.vsix package:
npm run package:vsix
- Test in development: Press F5 in VS Code to launch the Extension Development Host.
| |