From 04fc0dde1a79d669d54af27a49d8337aad56cccb Mon Sep 17 00:00:00 2001 From: Derrick Laird Date: Mon, 12 Feb 2024 21:01:08 -0700 Subject: [PATCH] languages: go.mod/go.work fix highlighting no longer working (#7705) At some point go.mod and go.work syntax highlighting quit working. Looks like the grammars weren't matching for some reason and I'm not sure how they were working originally. Not sure if we could write a test to make sure the tree-sitter queries are being loaded for the grammars or not but seems like something that could be useful to avoid something like this in the future. --- crates/zed/src/languages/gomod/config.toml | 2 +- crates/zed/src/languages/gowork/config.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/zed/src/languages/gomod/config.toml b/crates/zed/src/languages/gomod/config.toml index 19c7b20e8ccf2323d2f7651c8923fcec0df90d87..b4755fae7878f88847787068ff12a9cf8b963ca3 100644 --- a/crates/zed/src/languages/gomod/config.toml +++ b/crates/zed/src/languages/gomod/config.toml @@ -1,5 +1,5 @@ name = "Go Mod" -grammar = "go" +grammar = "gomod" path_suffixes = ["mod"] line_comments = ["//"] autoclose_before = ")" diff --git a/crates/zed/src/languages/gowork/config.toml b/crates/zed/src/languages/gowork/config.toml index 79621ecdafb7a60d53bdbb17925a8857a2d026f0..5a63dee2eeea2cbb87b5843f23c8a8a761f40982 100644 --- a/crates/zed/src/languages/gowork/config.toml +++ b/crates/zed/src/languages/gowork/config.toml @@ -1,5 +1,5 @@ name = "Go Work" -grammar = "go_work" +grammar = "gowork" path_suffixes = ["work"] line_comments = ["//"] autoclose_before = ")"