1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-03 13:00:05 +08:00
SpaceVim/bundle/nvim-lspconfig-0.1.4/lua/lspconfig/server_configurations/bufls.lua
2023-03-29 11:59:27 +08:00

34 lines
762 B
Lua

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")]],
},
},
}