Skip to content

Commit

Permalink
Syntax highlighting for HTTP and JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
TuhinNair committed Aug 4, 2020
1 parent dc8bcb5 commit 1984c22
Show file tree
Hide file tree
Showing 7 changed files with 428 additions and 5 deletions.
202 changes: 202 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ url = "2.1.1"
dirs = "3.0.1"
lazy_static = "1.4.0"
toml = "0.5.6"
syntect = "4.3.0"


33 changes: 33 additions & 0 deletions HTTP.sublime-syntax
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
%YAML 1.2
---
name: HTTP
file_extensions:
- http
scope: source.http
contexts:
main:
- match: ([A-Z]+)( +)([^ ]+)( +)(HTTP)(/)(\d+\.\d+)
captures:
1: function.name.http
2: string.quoted.double.http
3: entity.name.section.http
4: string.quoted.double.http
5: keyword.http
6: keyword.operator.http
7: constant.numeric.integer.decimal.http
- match: (HTTP)(/)(\d+\.\d+)( +)(\d{3})( +)(.+)
captures:
1: keyword.http
2: keyword.operator.http
3: constant.language.http
4: string.quoted.double.http
5: constant.numeric.integer.decimal.http
6: string.quoted.double.http
7: keyword.symbol.http
- match: (.*?)( *)(:)( *)(.+)
captures:
1: function.name.http
2: string.quoted.double.http
3: keyword.operator.http
4: string.quoted.double.http
5: string.quoted.double.http
Loading

0 comments on commit 1984c22

Please sign in to comment.