From 60493c62c98f32b04dd182aea9619780f7988979 Mon Sep 17 00:00:00 2001 From: jer Date: Fri, 12 Jul 2024 14:31:59 +1000 Subject: [PATCH] feat: add buck2 lsp and language settings --- languages.toml | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/languages.toml b/languages.toml index 6fed9b2df..f46bb33a0 100644 --- a/languages.toml +++ b/languages.toml @@ -4,7 +4,6 @@ use-grammars = { except = [ "hare", "wren", "gemini" ] } [language-server] - als = { command = "als" } ada-language-server = { command = "ada_language_server" } ada-gpr-language-server = {command = "ada_language_server", args = ["--language-gpr"]} @@ -86,6 +85,7 @@ slint-lsp = { command = "slint-lsp", args = [] } solargraph = { command = "solargraph", args = ["stdio"] } solc = { command = "solc", args = ["--lsp"] } sourcekit-lsp = { command = "sourcekit-lsp" } +starlark-lsp = {command = "starlark-lsp"} svlangserver = { command = "svlangserver", args = [] } swipl = { command = "swipl", args = [ "-g", "use_module(library(lsp_server))", "-g", "lsp_server:main", "-t", "halt", "--", "stdio" ] } tailwindcss-ls = { command = "tailwindcss-language-server", args = ["--stdio"] } @@ -110,6 +110,10 @@ pkgbuild-language-server = { command = "pkgbuild-language-server" } helm_ls = { command = "helm_ls", args = ["serve"] } ember-language-server = { command = "ember-language-server", args = ["--stdio"] } +[language-server.buck2] +command = "buck2" +args = ["lsp"] + [language-server.ansible-language-server] command = "ansible-language-server" args = ["--stdio"] @@ -125,7 +129,6 @@ paramName = "All" paramType = true await = true - [language-server.gopls] command = "gopls" @@ -2279,6 +2282,20 @@ file-types = ["bzl", "bazel", "star", { glob = "BUILD" }, { glob = "BUILD.*" }, comment-token = "#" indent = { tab-width = 4, unit = " " } grammar = "python" +language-servers = ['starlark-lsp'] + + +[[language]] +name = "buck2" +scope = "source.buck2" +injection-regex = "(bxl|bazel)" +file-types = [{glob = "BUCK"}, "bxl", "bzl", "TARGETS"] +comment-token = "#" +roots = [".buckconfig"] +indent = { tab-width = 4, unit = " " } +grammar = "startlark" +language-servers = ['buck2'] + [[language]] name = "elvish"