From d7e340b48fff7611f079234b96fafbeb88cf5d38 Mon Sep 17 00:00:00 2001 From: ath3 Date: Mon, 16 Jan 2023 22:30:49 +0100 Subject: [PATCH] Add tree-sitter-hosts --- book/src/generated/lang-support.md | 1 + languages.toml | 10 ++++++++++ runtime/queries/hosts/highlights.scm | 3 +++ 3 files changed, 14 insertions(+) create mode 100644 runtime/queries/hosts/highlights.scm diff --git a/book/src/generated/lang-support.md b/book/src/generated/lang-support.md index 00e6a91e2a1c..050f41019087 100644 --- a/book/src/generated/lang-support.md +++ b/book/src/generated/lang-support.md @@ -56,6 +56,7 @@ | haskell | ✓ | ✓ | | `haskell-language-server-wrapper` | | hcl | ✓ | | ✓ | `terraform-ls` | | heex | ✓ | ✓ | | `elixir-ls` | +| hosts | ✓ | | | | | html | ✓ | | | `vscode-html-language-server` | | idris | | | | `idris2-lsp` | | iex | ✓ | | | | diff --git a/languages.toml b/languages.toml index a66605b2902e..7c88ae1fbd44 100644 --- a/languages.toml +++ b/languages.toml @@ -2108,3 +2108,13 @@ formatter = { command = "dhall" , args = ["format"] } [[grammar]] name = "dhall" source = { git = "https://github.com/jbellerb/tree-sitter-dhall", rev = "affb6ee38d629c9296749767ab832d69bb0d9ea8" } + +[[language]] +name = "hosts" +scope = "source.hosts" +file-types = ["hosts"] +roots = [] + +[[grammar]] +name = "hosts" +source = { git = "https://github.com/ath3/tree-sitter-hosts", rev = "301b9379ce7dfc8bdbe2c2699a6887dcb73953f9" } diff --git a/runtime/queries/hosts/highlights.scm b/runtime/queries/hosts/highlights.scm new file mode 100644 index 000000000000..9d069031c9cc --- /dev/null +++ b/runtime/queries/hosts/highlights.scm @@ -0,0 +1,3 @@ +(comment) @comment +(ip) @namespace +(host) @string