From 0b6dea6dc2f78376890beeb31b591987f7f5249b Mon Sep 17 00:00:00 2001 From: Arthur Deierlein <110528300+c0rydoras@users.noreply.github.com> Date: Tue, 19 Mar 2024 13:27:46 +0100 Subject: [PATCH] Enhance support for PKGBUILDS (#9909) * enhance support for PKGBUILDS * run cargo xtask docgen --- book/src/generated/lang-support.md | 1 + languages.toml | 14 +++++++++++++- runtime/queries/pkgbuild/highlights.scm | 1 + runtime/queries/pkgbuild/indents.scm | 1 + runtime/queries/pkgbuild/injections.scm | 1 + runtime/queries/pkgbuild/textobjects.scm | 1 + 6 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 runtime/queries/pkgbuild/highlights.scm create mode 100644 runtime/queries/pkgbuild/indents.scm create mode 100644 runtime/queries/pkgbuild/injections.scm create mode 100644 runtime/queries/pkgbuild/textobjects.scm diff --git a/book/src/generated/lang-support.md b/book/src/generated/lang-support.md index 369680474..f7905df7c 100644 --- a/book/src/generated/lang-support.md +++ b/book/src/generated/lang-support.md @@ -134,6 +134,7 @@ | perl | ✓ | ✓ | ✓ | `perlnavigator` | | php | ✓ | ✓ | ✓ | `intelephense` | | php-only | ✓ | | | | +| pkgbuild | ✓ | ✓ | ✓ | `pkgbuild-language-server`, `bash-language-server` | | pkl | ✓ | | ✓ | | | po | ✓ | ✓ | | | | pod | ✓ | | | | diff --git a/languages.toml b/languages.toml index 1cf8da374..7c23f1f42 100644 --- a/languages.toml +++ b/languages.toml @@ -96,6 +96,7 @@ yaml-language-server = { command = "yaml-language-server", args = ["--stdio"] } zls = { command = "zls" } blueprint-compiler = { command = "blueprint-compiler", args = ["lsp"] } typst-lsp = { command = "typst-lsp" } +pkgbuild-language-server = { command = "pkgbuild-language-server" } [language-server.ansible-language-server] command = "ansible-language-server" @@ -906,7 +907,6 @@ file-types = [ { glob = ".zshrc" }, { glob = ".zimrc" }, { glob = "APKBUILD" }, - { glob = "PKGBUILD" }, { glob = ".bash_aliases" }, { glob = ".Renviron" }, { glob = ".xprofile" }, @@ -3352,3 +3352,15 @@ indent = { tab-width = 4, unit = "\t" } [[grammar]] name = "supercollider" source = { git = "https://github.com/madskjeldgaard/tree-sitter-supercollider", rev = "3b35bd0fded4423c8fb30e9585c7bacbcd0e8095" } + +[[language]] +name = "pkgbuild" +scope = "source.bash" +file-types = [{ glob = "PKGBUILD" }] +grammar = "bash" +language-servers = [ + "pkgbuild-language-server", + { except-features = [ + "diagnostics", + ], name = "bash-language-server" }, +] \ No newline at end of file diff --git a/runtime/queries/pkgbuild/highlights.scm b/runtime/queries/pkgbuild/highlights.scm new file mode 100644 index 000000000..b38e14222 --- /dev/null +++ b/runtime/queries/pkgbuild/highlights.scm @@ -0,0 +1 @@ +; inherits: bash diff --git a/runtime/queries/pkgbuild/indents.scm b/runtime/queries/pkgbuild/indents.scm new file mode 100644 index 000000000..b38e14222 --- /dev/null +++ b/runtime/queries/pkgbuild/indents.scm @@ -0,0 +1 @@ +; inherits: bash diff --git a/runtime/queries/pkgbuild/injections.scm b/runtime/queries/pkgbuild/injections.scm new file mode 100644 index 000000000..b38e14222 --- /dev/null +++ b/runtime/queries/pkgbuild/injections.scm @@ -0,0 +1 @@ +; inherits: bash diff --git a/runtime/queries/pkgbuild/textobjects.scm b/runtime/queries/pkgbuild/textobjects.scm new file mode 100644 index 000000000..b38e14222 --- /dev/null +++ b/runtime/queries/pkgbuild/textobjects.scm @@ -0,0 +1 @@ +; inherits: bash