From c64743381379c5bf3536f0e96c487dc2fa9c3b9a Mon Sep 17 00:00:00 2001 From: Markus Tauchnitz Date: Thu, 18 Jan 2024 12:56:24 +0100 Subject: [PATCH] feat: add bzl lsp --- lua/lspconfig/server_configurations/bzl.lua | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 lua/lspconfig/server_configurations/bzl.lua diff --git a/lua/lspconfig/server_configurations/bzl.lua b/lua/lspconfig/server_configurations/bzl.lua new file mode 100644 index 0000000000..0705689712 --- /dev/null +++ b/lua/lspconfig/server_configurations/bzl.lua @@ -0,0 +1,20 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'bzl', 'lsp', 'serve' }, + filetypes = { 'bzl' }, + -- https://docs.bazel.build/versions/5.4.1/build-ref.html#workspace + root_dir = util.root_pattern('WORKSPACE', 'WORKSPACE.bazel'), + }, + docs = { + description = [[ +https://docs.stack.build/docs/cli/installation + +https://docs.stack.build/docs/vscode/starlark-language-server +]], + default_config = { + root_dir = [[root_pattern(".git")]], + }, + }, +}