diff options
| author | Rintaro Okamura <rintaro.okamura@gmail.com> | 2022-08-22 11:54:51 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-21 19:54:51 -0700 |
| commit | abaf5fb6c496ecc9a19de1c2fbdf87a905138023 (patch) | |
| tree | 9e00435be7d0fde3f8610578e2927cb496de6280 /lua | |
| parent | docs: update server_configurations.md (diff) | |
| download | nvim-lspconfig-abaf5fb6c496ecc9a19de1c2fbdf87a905138023.tar nvim-lspconfig-abaf5fb6c496ecc9a19de1c2fbdf87a905138023.tar.gz nvim-lspconfig-abaf5fb6c496ecc9a19de1c2fbdf87a905138023.tar.bz2 nvim-lspconfig-abaf5fb6c496ecc9a19de1c2fbdf87a905138023.tar.lz nvim-lspconfig-abaf5fb6c496ecc9a19de1c2fbdf87a905138023.tar.xz nvim-lspconfig-abaf5fb6c496ecc9a19de1c2fbdf87a905138023.tar.zst nvim-lspconfig-abaf5fb6c496ecc9a19de1c2fbdf87a905138023.zip | |
feat: add buf-language-server support (#2073)
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")]], + }, + }, +} |
