diff --git a/.gitmodules b/.gitmodules index 860bcbb0..1d1b8429 100644 --- a/.gitmodules +++ b/.gitmodules @@ -278,3 +278,6 @@ [submodule "assets/syntaxes/02_Extra/hosts"] path = assets/syntaxes/02_Extra/hosts url = https://github.com/tijn/hosts.tmLanguage +[submodule "assets/syntaxes/02_Extra/Gomod"] + path = assets/syntaxes/02_Extra/Gomod + url = https://github.com/mitranim/sublime-gomod diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c77e8ae..56cdb429 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -58,6 +58,7 @@ - Update hosts syntax #3368 (@keith-hall) - Map `.kshrc` files to Bash syntax #3364 (@ritoban23) - Map `/var/log/dmesg` files to Syslog syntax #3412 (@keith-hall) +- Add syntax definition and test file for Go modules(`go.mod` and `go.sum`) highlighting, see #3424 (@DarkMatter-999) ## Themes diff --git a/Cargo.lock b/Cargo.lock index 4389a082..14ba58fc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -133,8 +133,7 @@ dependencies = [ "grep-cli", "home", "indexmap", - "itertools 0.13.0", - "itertools 0.14.0", + "itertools", "minus", "nix", "nu-ansi-term", @@ -900,15 +899,6 @@ version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" -[[package]] -name = "itertools" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" -dependencies = [ - "either", -] - [[package]] name = "itertools" version = "0.14.0" @@ -1867,9 +1857,9 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "wait-timeout" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" +checksum = "09ac3b126d3914f9849036f826e054cbabdc8519970b8998ddaf3b5bd3c65f11" dependencies = [ "libc", ] diff --git a/Cargo.toml b/Cargo.toml index 089822b8..85d97474 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -74,7 +74,7 @@ encoding_rs = "0.8.35" execute = { version = "0.2.13", optional = true } terminal-colorsaurus = "1.0" unicode-segmentation = "1.12.0" -itertools = "0.13.0" +itertools = "0.14.0" [dependencies.git2] version = "0.20" @@ -100,7 +100,7 @@ assert_cmd = "2.0.12" expect-test = "1.5.0" serial_test = { version = "2.0.0", default-features = false } predicates = "3.1.3" -wait-timeout = "0.2.0" +wait-timeout = "0.2.1" tempfile = "3.16.0" serde = { version = "1.0", features = ["derive"] } diff --git a/assets/syntaxes/02_Extra/Gomod b/assets/syntaxes/02_Extra/Gomod new file mode 160000 index 00000000..e0200f02 --- /dev/null +++ b/assets/syntaxes/02_Extra/Gomod @@ -0,0 +1 @@ +Subproject commit e0200f024a394d6e7d6b7b37a070bb8ef324b19b diff --git a/tests/syntax-tests/highlighted/Go/go.mod b/tests/syntax-tests/highlighted/Go/go.mod new file mode 100644 index 00000000..26d11781 --- /dev/null +++ b/tests/syntax-tests/highlighted/Go/go.mod @@ -0,0 +1,5 @@ +module hugeparam + +go 1.25.1 + +require golang.org/x/tools v0.37.0 diff --git a/tests/syntax-tests/highlighted/Go/go.sum b/tests/syntax-tests/highlighted/Go/go.sum new file mode 100644 index 00000000..54394747 --- /dev/null +++ b/tests/syntax-tests/highlighted/Go/go.sum @@ -0,0 +1,6 @@ +golang.org/x/mod v0.28.0 h1:gQBtGhjxykdjY9YhZpSlZIsbnaE2+PgjfLWUQTnoZ1U= +golang.org/x/mod v0.28.0/go.mod h1:yfB/L0NOf/kmEbXjzCPOx1iK1fRutOydrCMsqRhEBxI= +golang.org/x/sync v0.17.0 h1:l60nONMj9l5drqw6jlhIELNv9I0A4OFgRsG9k2oT9Ug= +golang.org/x/sync v0.17.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= +golang.org/x/tools v0.37.0 h1:DVSRzp7FwePZW356yEAChSdNcQo6Nsp+fex1SUW09lE= +golang.org/x/tools v0.37.0/go.mod h1:MBN5QPQtLMHVdvsbtarmTNukZDdgwdwlO5qGacAzF0w= diff --git a/tests/syntax-tests/source/Go/go.mod b/tests/syntax-tests/source/Go/go.mod new file mode 100644 index 00000000..9f229ef3 --- /dev/null +++ b/tests/syntax-tests/source/Go/go.mod @@ -0,0 +1,5 @@ +module hugeparam + +go 1.25.1 + +require golang.org/x/tools v0.37.0 diff --git a/tests/syntax-tests/source/Go/go.sum b/tests/syntax-tests/source/Go/go.sum new file mode 100644 index 00000000..f04bc1a7 --- /dev/null +++ b/tests/syntax-tests/source/Go/go.sum @@ -0,0 +1,6 @@ +golang.org/x/mod v0.28.0 h1:gQBtGhjxykdjY9YhZpSlZIsbnaE2+PgjfLWUQTnoZ1U= +golang.org/x/mod v0.28.0/go.mod h1:yfB/L0NOf/kmEbXjzCPOx1iK1fRutOydrCMsqRhEBxI= +golang.org/x/sync v0.17.0 h1:l60nONMj9l5drqw6jlhIELNv9I0A4OFgRsG9k2oT9Ug= +golang.org/x/sync v0.17.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= +golang.org/x/tools v0.37.0 h1:DVSRzp7FwePZW356yEAChSdNcQo6Nsp+fex1SUW09lE= +golang.org/x/tools v0.37.0/go.mod h1:MBN5QPQtLMHVdvsbtarmTNukZDdgwdwlO5qGacAzF0w=