diff --git a/.gitmodules b/.gitmodules index 20e0bbb4..68c07c91 100644 --- a/.gitmodules +++ b/.gitmodules @@ -281,3 +281,6 @@ [submodule "assets/syntaxes/02_Extra/Kotlin"] path = assets/syntaxes/02_Extra/Kotlin url = https://github.com/guille/sublime-kotlin +[submodule "assets/syntaxes/02_Extra/Caddy"] + path = assets/syntaxes/02_Extra/Caddy + url = https://github.com/caddyserver/sublimetext.git diff --git a/CHANGELOG.md b/CHANGELOG.md index c57dd731..6e98c19a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -66,6 +66,7 @@ - Improved Kotlin syntax, see #3699 (@guille) - Include subdirectories in SSH Config syntax mapping, see #3758 (@injust) - Add Ghostty syntax mapping, see #3759 (@injust) +- Add syntax highlighting for `Caddyfile` #3789 (@CosmicHorrorDev) ## Themes diff --git a/assets/syntaxes/02_Extra/Caddy b/assets/syntaxes/02_Extra/Caddy new file mode 160000 index 00000000..cd7d132d --- /dev/null +++ b/assets/syntaxes/02_Extra/Caddy @@ -0,0 +1 @@ +Subproject commit cd7d132da38291b632995f84ae1e920458943b18 diff --git a/tests/syntax-tests/highlighted/Caddyfile/Caddyfile b/tests/syntax-tests/highlighted/Caddyfile/Caddyfile new file mode 100644 index 00000000..ab2f6a55 --- /dev/null +++ b/tests/syntax-tests/highlighted/Caddyfile/Caddyfile @@ -0,0 +1,25 @@ +(logging) { + log { + output file /var/log/caddy.log + } +} + +# a comment +localhost:8080, example.com { + root * /var/www/site + file_server + reverse_proxy /.well-known/matrix/* localhost:8008 { + header_up Host {upstream_hostport} + } + import logging +} + +www.example.com { + redir https://example.com{uri} permanent + import logging +} + +status.example.com { + reverse_proxy localhost:3002 + import logging +} diff --git a/tests/syntax-tests/source/Caddyfile/Caddyfile b/tests/syntax-tests/source/Caddyfile/Caddyfile new file mode 100644 index 00000000..1fa41b9d --- /dev/null +++ b/tests/syntax-tests/source/Caddyfile/Caddyfile @@ -0,0 +1,25 @@ +(logging) { + log { + output file /var/log/caddy.log + } +} + +# a comment +localhost:8080, example.com { + root * /var/www/site + file_server + reverse_proxy /.well-known/matrix/* localhost:8008 { + header_up Host {upstream_hostport} + } + import logging +} + +www.example.com { + redir https://example.com{uri} permanent + import logging +} + +status.example.com { + reverse_proxy localhost:3002 + import logging +}