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

Enable semantic highlighting #110

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add more semantic highlighting scopes
  • Loading branch information
s-newman committed Dec 16, 2020
commit dca95be404e2d3a10d6cade88400d9277c862573
24 changes: 24 additions & 0 deletions ayu-dark-bordered.json
Original file line number Diff line number Diff line change
Expand Up @@ -767,6 +767,30 @@
"background": "#b3b1ad",
"foreground": "#626a73"
}
},
{
"scope": "emphasis",
"settings": {
"fontStyle": "italic"
}
},
{
"scope": "strong",
"settings": {
"fontStyle": "bold"
}
},
{
"scope": "markup.underline",
"settings": {
"fontStyle": "underline"
}
},
{
"scope": "markup.italic",
"settings": {
"fontStyle": "italic"
}
}
]
}
24 changes: 24 additions & 0 deletions ayu-dark.json
Original file line number Diff line number Diff line change
Expand Up @@ -766,6 +766,30 @@
"background": "#b3b1ad",
"foreground": "#626a73"
}
},
{
"scope": "emphasis",
"settings": {
"fontStyle": "italic"
}
},
{
"scope": "strong",
"settings": {
"fontStyle": "bold"
}
},
{
"scope": "markup.underline",
"settings": {
"fontStyle": "underline"
}
},
{
"scope": "markup.italic",
"settings": {
"fontStyle": "italic"
}
}
]
}
24 changes: 24 additions & 0 deletions ayu-light-bordered.json
Original file line number Diff line number Diff line change
Expand Up @@ -767,6 +767,30 @@
"background": "#575f66",
"foreground": "#abb0b6"
}
},
{
"scope": "emphasis",
"settings": {
"fontStyle": "italic"
}
},
{
"scope": "strong",
"settings": {
"fontStyle": "bold"
}
},
{
"scope": "markup.underline",
"settings": {
"fontStyle": "underline"
}
},
{
"scope": "markup.italic",
"settings": {
"fontStyle": "italic"
}
}
]
}
24 changes: 24 additions & 0 deletions ayu-light.json
Original file line number Diff line number Diff line change
Expand Up @@ -766,6 +766,30 @@
"background": "#575f66",
"foreground": "#abb0b6"
}
},
{
"scope": "emphasis",
"settings": {
"fontStyle": "italic"
}
},
{
"scope": "strong",
"settings": {
"fontStyle": "bold"
}
},
{
"scope": "markup.underline",
"settings": {
"fontStyle": "underline"
}
},
{
"scope": "markup.italic",
"settings": {
"fontStyle": "italic"
}
}
]
}
24 changes: 24 additions & 0 deletions ayu-mirage-bordered.json
Original file line number Diff line number Diff line change
Expand Up @@ -767,6 +767,30 @@
"background": "#cbccc6",
"foreground": "#5c6773"
}
},
{
"scope": "emphasis",
"settings": {
"fontStyle": "italic"
}
},
{
"scope": "strong",
"settings": {
"fontStyle": "bold"
}
},
{
"scope": "markup.underline",
"settings": {
"fontStyle": "underline"
}
},
{
"scope": "markup.italic",
"settings": {
"fontStyle": "italic"
}
}
]
}
24 changes: 24 additions & 0 deletions ayu-mirage.json
Original file line number Diff line number Diff line change
Expand Up @@ -766,6 +766,30 @@
"background": "#cbccc6",
"foreground": "#5c6773"
}
},
{
"scope": "emphasis",
"settings": {
"fontStyle": "italic"
}
},
{
"scope": "strong",
"settings": {
"fontStyle": "bold"
}
},
{
"scope": "markup.underline",
"settings": {
"fontStyle": "underline"
}
},
{
"scope": "markup.italic",
"settings": {
"fontStyle": "italic"
}
}
]
}
30 changes: 30 additions & 0 deletions src/template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -830,6 +830,36 @@ export default (variant: SchemeName, bordered: boolean) => {
'background': scheme.common.fg.hex(),
'foreground': scheme.syntax.comment.hex()
}
},


// ------
// Additional scopes for semantic highlighting
// Adapted from the default dark theme for VS code:
// https://github.com/microsoft/vscode/blob/1.52.0/extensions/theme-defaults/themes/dark_vs.json
{
'scope': 'emphasis',
'settings': {
'fontStyle': 'italic'
}
},
{
'scope': 'strong',
'settings': {
'fontStyle': 'bold',
}
},
{
'scope': 'markup.underline',
'settings': {
'fontStyle': 'underline'
}
},
{
'scope': 'markup.italic',
'settings': {
'fontStyle': 'italic'
}
}
]
}
Expand Down