This is a hacky Roslyn-based LSP server for Visual Basic, based on csharp-ls.
vb-ls
requires .NET 8 SDK to be installed. However it has been reported
to work with projects using older versions of dotnet SDK, including .NET Core 3,
.NET Framework 4.8 and possibly older ones too as it uses the standard
Roslyn/MSBuild libs that Visual Studio & omnisharp does.
- vb-ls is not affiliated with Microsoft Corp;
- vb-ls is based on the work razzmatazz in csharp-ls
- vb-ls uses LSP interface from Ionide.LanguageServerProtocol;
- vb-ls uses Roslyn to parse and update code; Roslyn maps really nicely to LSP w/relatively little impedance mismatch;
- vb-ls uses ILSpy/ICSharpCode.Decompiler to decompile types in assemblies to C# source.
dotnet tool install --global vb-ls
See vb-ls nuget page
vb.solution
- solution to load, optionalvb.applyFormattingOptions
- use formatting options as supplied by the client (may override.editorconfig
values), defaults tofalse
vb-ls
implements the standard LSP protocol to interact with your editor.
However there are some features that need a non-standard implementation and this
is where editor-specific plugins can be helpful.
NeoVim 0.11+ can easily be configured using the vim.lsp.config
api.
vim.lsp.config['vb_ls'] = {
cmd = { 'vb-ls' },
root_markers = { '*.sln', '*.slnx', '*.vbproj' },
filetypes = { 'vbnet' },
init_options = {
AutomaticWorkspaceInit = true,
},
}
vim.lsp.enable('vb_ls')
Be sure to also add the contents of the vim-config folder to your vim start directory to register improved syntax highlighting and the vbnet filetype.
See vscode-vb-ls.