From 9d3245eebe28a184d77ec84099366b658238ab10 Mon Sep 17 00:00:00 2001 From: Keith Hall Date: Thu, 7 Aug 2025 22:32:32 +0300 Subject: [PATCH] Replace missing asset submodules --- .gitmodules | 8 +++---- CHANGELOG.md | 1 + assets/syntaxes/02_Extra/Hosts.sublime-syntax | 23 ------------------- assets/syntaxes/02_Extra/hosts | 2 +- tests/syntax-tests/highlighted/Hosts/hosts | 12 +++++----- 5 files changed, 12 insertions(+), 34 deletions(-) delete mode 100644 assets/syntaxes/02_Extra/Hosts.sublime-syntax diff --git a/.gitmodules b/.gitmodules index 1ba4495e..860bcbb0 100644 --- a/.gitmodules +++ b/.gitmodules @@ -113,9 +113,6 @@ [submodule "assets/syntaxes/DotENV"] path = assets/syntaxes/02_Extra/DotENV url = https://github.com/zaynali53/DotENV -[submodule "assets/syntaxes/hosts"] - path = assets/syntaxes/02_Extra/hosts - url = https://github.com/brandonwamboldt/sublime-hosts [submodule "assets/syntaxes/ssh-config"] path = assets/syntaxes/02_Extra/ssh-config url = https://github.com/robballou/sublimetext-sshconfig.git @@ -177,7 +174,7 @@ url = https://github.com/euler0/sublime-glsl [submodule "assets/syntaxes/02_Extra/Nginx"] path = assets/syntaxes/02_Extra/Nginx - url = https://github.com/brandonwamboldt/sublime-nginx + url = https://github.com/SublimeText/nginx [submodule "assets/syntaxes/02_Extra/Apache"] path = assets/syntaxes/02_Extra/Apache url = https://github.com/colinta/ApacheConf.tmLanguage @@ -278,3 +275,6 @@ [submodule "assets/syntaxes/02_Extra/SmartVHDL"] path = assets/syntaxes/02_Extra/SmartVHDL url = https://github.com/TheClams/SmartVHDL +[submodule "assets/syntaxes/02_Extra/hosts"] + path = assets/syntaxes/02_Extra/hosts + url = https://github.com/tijn/hosts.tmLanguage diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e5175c6..152b7d34 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -48,6 +48,7 @@ - Add syntax mapping for certbot certificate configuration #3338 (@cyqsimon) - Update Lean syntax from Lean 3 to Lean 4 #3322 (@YDX-2147483647) - Map `.flatpakref` and `.flatpakrepo` files to INI syntax #3353 (@Ferenc-) +- Update hosts syntax #3368 (@keith-hall) ## Themes diff --git a/assets/syntaxes/02_Extra/Hosts.sublime-syntax b/assets/syntaxes/02_Extra/Hosts.sublime-syntax deleted file mode 100644 index eac0ec0e..00000000 --- a/assets/syntaxes/02_Extra/Hosts.sublime-syntax +++ /dev/null @@ -1,23 +0,0 @@ -%YAML 1.2 ---- -# http://www.sublimetext.com/docs/3/syntax.html -name: hosts -file_extensions: - - hosts -scope: source.hosts - -contexts: - main: - - scope: comment.line.number-sign - match: \#.* - comment: comment - - - match: ^\s*([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}|[0-9a-f:]+) - comment: ipaddress - scope: constant.numeric.ipaddress - - - - match: \s(localhost|ip6-loopback|ip6-localhost|ip6-localnet|ip6-mcastprefix|ip6-allnodes|ip6-allrouters|ip6-allhosts|broadcasthost)\b - scope: keyword.host.predefined} - comment: prefdfined - diff --git a/assets/syntaxes/02_Extra/hosts b/assets/syntaxes/02_Extra/hosts index 21250a71..60ed92c4 160000 --- a/assets/syntaxes/02_Extra/hosts +++ b/assets/syntaxes/02_Extra/hosts @@ -1 +1 @@ -Subproject commit 21250a7117655b0525821237b98b882dcc231350 +Subproject commit 60ed92c472dc6038a13a38d033bba6bc64fd6913 diff --git a/tests/syntax-tests/highlighted/Hosts/hosts b/tests/syntax-tests/highlighted/Hosts/hosts index 8d322f00..22166747 100644 --- a/tests/syntax-tests/highlighted/Hosts/hosts +++ b/tests/syntax-tests/highlighted/Hosts/hosts @@ -1,8 +1,8 @@ -#this is a comment in the hosts file -127.0.0.1  localhost +#this is a comment in the hosts file +127.0.0.1 localhost -192.168.0.1 sample.test #a comment -192.160.0.200 try.sample.test try #another comment -216.58.223.238 google.com +192.168.0.1 sample.test #a comment +192.160.0.200 try.sample.test try #another comment +216.58.223.238 google.com -::1 localhost.try ip6-localhost +::1 localhost.try ip6-localhost