Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add monokai theme #157

Merged
merged 2 commits into from
Jun 19, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions assets/ansi.tmTheme
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,6 @@
<string>#04000000</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Floats</string>
<key>scope</key>
<string>none</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#04000000</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Constants</string>
Expand Down
18 changes: 11 additions & 7 deletions assets/basic/http.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,26 @@ file_extensions:
scope: source.http
contexts:
main:
- match: ^(?:([a-zA-Z]+(-?))\s+)?\s*(\S+)(?:\s+(((?i)HTTP(-?))\/(\S+)))?$
- match: ^(?:([a-zA-Z]+(-?))\s+)?\s*(\S+)(?:\s+(((?i)HTTP(-?))(\/)(\S+)))?$
scope: http.requestline
captures:
1: keyword.control.http
3: const.language.http
5: keyword.other.http
7: constant.numeric.http
- match: '^([\w\-]+)\s*\: ?(.*)$'
7: punctuation.separator.http
8: constant.numeric.http
- match: '^([\w\-]+)\s*(:) ?(.*)$'
scope: http.requestheaders
captures:
1: support.variable.http
2: string.other.http
- match: '^\s*((?i)HTTP(-?))\/(\S+)\s([1-5][0-9][0-9])\s(.*)$'
2: punctuation.separator.http
3: string.other.http
- match: '^\s*((?i)HTTP(-?))(\/)(\S+)\s([1-5][0-9][0-9])\s(.*)$'
scope: http.responseLine
captures:
1: keyword.other.http
3: constant.numeric.http
3: punctuation.separator.http
4: constant.numeric.http
5: keyword.reason.http
4: constant.numeric.http
5: constant.numeric.http
6: keyword.reason.http
190 changes: 190 additions & 0 deletions assets/monokai.tmTheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,190 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<!--
The colors in this theme are encoded as #RRGGBBAA where RR is an ANSI
palette number from 00 to 0f, and AA is the special value 00 to indicate
that this encoding is being used.
-->
<key>name</key>
<string>ANSI Dark</string>
<key>colorSpaceName</key>
<string>sRGB</string>
<key>settings</key>
<array>
<dict>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#0F000000</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Integers</string>
<key>scope</key>
<string>constant.numeric</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#8D000000</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Constants</string>
<key>scope</key>
<string>constant</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#51000000</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Strings</string>
<key>scope</key>
<string>string.quoted, punctuation.definition.string.begin, punctuation.definition.string.end</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#BA000000</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Comments</string>
<key>scope</key>
<string>comment</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#F2000000</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Doctype</string>
<key>scope</key>
<string>meta.tag.sgml, entity.name.tag.doctype</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#F2000000</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Tags</string>
<key>scope</key>
<string>entity.name.tag</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#C5000000</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Attributes</string>
<key>scope</key>
<string>entity.other.attribute-name</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#94000000</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Header keys</string>
<key>scope</key>
<string>source.http http.requestheaders support.variable.http</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#94000000</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Header values</string>
<key>scope</key>
<string>source.http http.requestheaders string.other.http</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#BA000000</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>HTTP</string>
<key>scope</key>
<string>keyword.other.http</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#51000000</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>HTTP seperator</string>
<key>scope</key>
<string>punctuation.separator.http</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#C5000000</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>HTTP version</string>
<key>scope</key>
<string>constant.numeric.http</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#8D000000</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>HTTP reason phrase</string>
<key>scope</key>
<string>keyword.reason.http</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#94000000</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>HTTP method</string>
<key>scope</key>
<string>keyword.control.http</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#94000000</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>JSON keys</string>
<key>scope</key>
<string>keyword.other.name.jsonkv</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#C5000000</string>
</dict>
</dict>
</array>
</dict>
</plist>
11 changes: 0 additions & 11 deletions assets/solarized.tmTheme
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,6 @@
<string>#25000000</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Floats</string>
<key>scope</key>
<string>none</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#25000000</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Constants</string>
Expand Down
3 changes: 2 additions & 1 deletion src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ arg_enum! {
#[allow(non_camel_case_types)]
#[derive(Debug, PartialEq, Clone, Copy)]
pub enum Theme {
auto, solarized
auto, solarized, monokai
}
}

Expand All @@ -585,6 +585,7 @@ impl Theme {
match self {
Theme::auto => "ansi",
Theme::solarized => "solarized",
Theme::monokai => "monokai",
}
}
}
Expand Down