diff options
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/lspconfig/server_configurations/bufls.lua | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/lua/lspconfig/server_configurations/bufls.lua b/lua/lspconfig/server_configurations/bufls.lua new file mode 100644 index 00000000..aa25b4c0 --- /dev/null +++ b/lua/lspconfig/server_configurations/bufls.lua @@ -0,0 +1,33 @@ +local util = require 'lspconfig.util' + +local bin_name = 'bufls' +local cmd = { bin_name, 'serve' } + +if vim.fn.has 'win32' == 1 then + cmd = { 'cmd.exe', '/C', bin_name, 'start' } +end + +return { + default_config = { + cmd = cmd, + filetypes = { 'proto' }, + root_dir = function(fname) + return util.root_pattern('buf.work.yaml', '.git')(fname) + end, + }, + docs = { + description = [[ +https://github.com/bufbuild/buf-language-server + +`buf-language-server` can be installed via `go install`: +```sh +go install github.com/bufbuild/buf-language-server/cmd/bufls@latest +``` + +bufls is a Protobuf language server compatible with Buf modules and workspaces +]], + default_config = { + root_dir = [[root_pattern("buf.work.yaml", ".git")]], + }, + }, +} |
