Unnamed repository; edit this file 'description' to name the repository.
-rw-r--r--book/src/generated/lang-support.md2
-rw-r--r--languages.toml4
-rw-r--r--runtime/queries/hdl/highlights.scm18
3 files changed, 21 insertions, 3 deletions
diff --git a/book/src/generated/lang-support.md b/book/src/generated/lang-support.md
index 0fdf738d..aa79bdab 100644
--- a/book/src/generated/lang-support.md
+++ b/book/src/generated/lang-support.md
@@ -107,7 +107,7 @@
| haskell | ✓ | ✓ | | | | `haskell-language-server-wrapper` |
| haskell-persistent | ✓ | | | | | |
| hcl | ✓ | ✓ | ✓ | | | `terraform-ls` |
-| hdl | ✓ | | | | | |
+| hdl | ✓ | | | | | `hdls` |
| heex | ✓ | ✓ | | | | `elixir-ls`, `expert` |
| helm | ✓ | | | | | `helm_ls` |
| hocon | ✓ | ✓ | ✓ | | | |
diff --git a/languages.toml b/languages.toml
index 49048918..da9d1f68 100644
--- a/languages.toml
+++ b/languages.toml
@@ -56,6 +56,7 @@ glsl_analyzer = { command = "glsl_analyzer" }
graphql-language-service = { command = "graphql-lsp", args = ["server", "-m", "stream"] }
harper-ls = { command = "harper-ls", args = ["--stdio"] }
haskell-language-server = { command = "haskell-language-server-wrapper", args = ["--lsp"] }
+hdls = { command = "hdls" }
hyprls = { command = "hyprls" }
idris2-lsp = { command = "idris2-lsp" }
intelephense = { command = "intelephense", args = ["--stdio"] }
@@ -3401,10 +3402,11 @@ scope = "source.hdl"
file-types = ["hdl"]
indent = { tab-width = 4, unit = " " }
injection-regex = "hdl"
+language-servers = [ "hdls" ]
[[grammar]]
name = "hdl"
-source = { git = "https://github.com/quantonganh/tree-sitter-hdl", rev = "7d0418fd71470b0430e6f914cc76c1a9d968491d" }
+source = { git = "https://github.com/quantonganh/tree-sitter-hdl", rev="293902330423b2cd36ab1ec4b6b967163a4ed57b" }
[[language]]
name = "vhdl"
diff --git a/runtime/queries/hdl/highlights.scm b/runtime/queries/hdl/highlights.scm
index 17d1a049..053c99a6 100644
--- a/runtime/queries/hdl/highlights.scm
+++ b/runtime/queries/hdl/highlights.scm
@@ -4,6 +4,8 @@
"IN"
"OUT"
"PARTS"
+ "BUILTIN"
+ "CLOCKED"
] @keyword
(identifier) @variable
@@ -17,12 +19,26 @@
(out_section
output_pin_name: (identifier) @variable.parameter)
+(builtin_body
+ chip_name: (identifier) @function)
+
+(clocked_body
+ (identifier) @variable.parameter)
+
(part
chip_name: (identifier) @function)
(connection
part_pin: (identifier) @variable.other.member
- chip_pin: (identifier) @variable.parameter)
+ chip_pin: [
+ (identifier) @variable.parameter
+ (bus_identifier
+ (identifier) @variable.parameter
+ (number) @constant.numeric)
+ ])
+
+(bus_identifier
+ (number) @constant.numeric)
;; Comments
(comment) @comment