Closed raytroop closed 6 years ago
@raytroop This was a change that @Binaryify done for issuw #252.
@Binaryify It's clear people really like italics. Continuing on from #250, from merging ODP and Vivid, perhaps create an italicised version too?
Thanks @beastdestroyer but I DONT like italics, maybe I belong to the minority I indeed like previous version.
@raytroop you can custom theme check the docs https://binaryify.github.io/OneDark-Pro/#/?id=user-definable-syntax-highlighting-colors
I see, thanks @Binaryify
work like a charm @Binaryify @beastdestroyer
{
"name": "Python Keyword Control",
"scope": "keyword.control.import.python,keyword.control.flow.python",
"settings": {
"fontStyle": "normal"
}
}
👍
@Binaryify I'm trying to apply the code posted by @raytroop, but I couldn't find the syntax.json in my vs code files folder as mentioned in the doc. Is there any other way to change everything to non-italic?
@stevencollinscn The link to that section of the docs doesn't seem to work right. If you scroll almost to the bottom of the page you will see a section named User definable syntax highlighting colors which explains how to add the overrides.
@stevencollinscn Can you post the relevant portion of your settings.json
file containing your change?
Doesn't seems working. I already have a setting for comment
. Am I missing something since I'm not really familiar with json files.
@stevencollinscn Ah, I see the problem. Because this theme applies italics to multiple comment related scopes, the scope of comment
isn't specific enough. Try adding the code below and see if that works.
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"name": "Comments",
"scope": [
"comment",
"punctuation.definition.comment",
"comment.line.double-slash",
"comment.block.documentation"
],
"settings": {
"fontStyle": ""
}
}
]
}
@markypython Thanks, buddy. I'm sorry if I somehow misrepresented myself. I'm actually trying to disable other italics such as import
, for
, if
, and those keywords (e.g., dtype
) in functions. My setting on comment
was actually fine, and I didn't see any comment
or docstrings are being italicized.
@stevencollinscn Gotcha. What you can do is find a keyword that you don't want italicized, place your cursor on the keyword, open the command palette, and type Developer: Inspect TM Scopes. This will show you the scopes that are in play for that keyword which you can then check against the syntax.json file in this repo to determine which scopes need to be overridden to get your styles to apply.
@markypython I finally found the syntax.js and changed it to the following, but nothing seems changed.
@stevencollinscn You don't change the syntax.json file. You need to change the settings in your settings.json file using the information from syntax.json.
From your screenshot the code would be as follows:
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"name": "Python Keyword Control",
"scope": [
"keyword.control.import.python"
"keyword.control.flow.python"
],
"settings": {
"fontStyle": ""
}
}
]
}
@stevencollinscn
syntax.js is the file before compilation, you need run npm run build
or change /themes/OneDark-Pro.json
or just change settings.json like @markypython show
@markypython thanks, man. it is finally working!
@Binaryify should've read your docs; the folder is somehow named "marital theme" or something, which really confused me.
@stevencollinscn Just merge the scopes like this.
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"name": "Non italic",
"scope": [
"comment",
"punctuation.definition.comment",
"comment.line.double-slash",
"comment.block.documentation",
"keyword.control.import.python",
"keyword.control.flow.python"
],
"settings": {
"fontStyle": ""
}
}
]
}
As a note, the name of the rule doesn't have any affect on how VS code formats, so you can put anything in there. Splitting into multiple rules isn't necessary.
@stevencollinscn yes, that's a historical reason and I can't change it because it will lose downloads
@markypython Thanks a lot man...This definitely more "pythonic" to read. Lol...
@Binaryify I see.. That makes sense. I really enjoy this theme as missing Atom and thanks for your work. Btw, I also apply One Dark Bold, it doesn't seem changed anything. Is it design for some other language than Python?
I'm actually curious why many themes now are adapting italics. Is there any design or technical reason? Easy to read? More productive?
as you can see,
for in
clause is not font consistent thatfor
italic andin
is normal. at a word, what i need is normal font everywhere except comment.Any suggestion? Thanks
extension version: 2.16.5 vscode version: 1.27.2 OS: Ubuntu 16.04.5 LTS / Ubuntu 18.04.1 LTS