Skip to content

Commit 750f92d

Browse files
feat: vb_ls
1 parent 314b353 commit 750f92d

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

lsp/vb_ls.lua

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---@brief
2+
---
3+
--- https://github.com/CoolCoderSuper/visualbasic-language-server
4+
---
5+
--- Language Server for VB.NET.
6+
---
7+
--- vb-ls requires the [dotnet-sdk](https://dotnet.microsoft.com/download) to be installed.
8+
---
9+
--- The preferred way to install vb-ls is with `dotnet tool install --global vb-ls`.
10+
--- Additionally you need to register the .vb extension with the vbnet filetype.
11+
--- A plugin that does this as well as improved syntax highlighting is [vbnet.nvim](https://github.com/CoolCoderSuper/vbnet.nvim).
12+
13+
local util = require 'lspconfig.util'
14+
15+
return {
16+
cmd = { 'vb-ls' },
17+
root_dir = function(bufnr, on_dir)
18+
local fname = vim.api.nvim_buf_get_name(bufnr)
19+
on_dir(util.root_pattern '*.sln'(fname) or util.root_pattern '*.vbproj'(fname) or util.root_pattern '*.slnx'(fname))
20+
end,
21+
filetypes = { 'vbnet' },
22+
init_options = {
23+
AutomaticWorkspaceInit = true,
24+
},
25+
}

0 commit comments

Comments
 (0)