jdinhify / vscode-theme-gruvbox

Gruvbox theme for vscode based on https://github.com/morhetz/gruvbox
https://marketplace.visualstudio.com/items?itemName=jdinhlife.gruvbox
MIT License
274 stars 63 forks source link

Almost no LaTeX keywords are being highlighted #19

Open nicentra opened 5 years ago

nicentra commented 5 years ago

I just found this theme, it's amazing, a lot better than your competitors Gruvbox Theme (he misses like most of the UI themeing) however I noticed yours doesn't really highlight LaTeX, see screenshot below of a dummy file.

image

In any case awesome work!

PS: Is it possible to get the colortest script used in the screenshots? Looks neat

nicentra commented 5 years ago

I spliced the theme a bit on my own via my vscode setting adding the following settings:

"editor.tokenColorCustomizations": {
        "[Gruvbox Dark Hard]": {
            "textMateRules": [
                {
                    "scope": ["source.latex", "keyword.control"],
                    "settings": {
                        "foreground": "#fb4934"
                    }
                },
                {
                    "scope": ["source.latex", "support.function"],
                    "settings": {
                        "foreground": "#fb4934"
                    }
                }
            ]
        }
    }

I honestly don't know if that catches all of it but I don't really know what I'm looking since my 5mins of google didn't turn up any nice API explaining to me what namespace belongs to what

jdinhify commented 5 years ago

Thanks @nicentra.

PS: Is it possible to get the colortest script used in the screenshots? Looks neat

I can't remember which script I used for the screenshot, but there're similar ones out there, for instance: https://github.com/pablopunk/colortest

Back on the theme. Would you be able to contribute to this theme for LaTeX? I'm not using it so not sure if I know what to customise. I you want to contribute, you can make the theme work to your liking for starter.

There's a few options for contributing:

  1. Do what you do currently with the setting for tokenColoCustomizations, then post them here and I can put them into the theme
  2. Pull the repo locally and edit the json files in themes folder. Customizations here would need to be defined for all 6 variants

In both options, you can use the following the shape for the rule:

{
  "name": "<description of what the rule is for, eg. LaTeX string>",
  "scope": [
    "source.latex <selector, eg. string.double>",
    "source.latex <another selector>"
  ],
  "settings": {
    "foreground": "#<color code>"
  }
},

Please let me know if you're keen and need any support.

nicentra commented 5 years ago

Hey @jdinhify I can certainly try, though admittedly I don't have a lot of time rn since I actually found this loophole because I am currently writting my bachelor thesis. However with the Developer Inspect it should go a lot faster. Do you have any color guide? e.g. Functions = this color, variables = this color, keywords = that, parameters = this? e: Also if I pull the repo locally, how do I "install it" in vscode for dev?

jdinhify commented 5 years ago

I don't really have a color guide, just do what you see fit your taste I think. I think generally there are some common things like green for string, yellow for function, red for keywords, blue for parameters, but they're probably not the same for every language atm.

What I usually do is to pull the repo into ~/.vscode/extensions folder, that way it'll automatically appear in your extension list. Now that you'll actually have 2 gruvbox themes in your list, you can solve the confusion by either:

Also, if you decide to do that, please create a file in the code-examples folder for LaTeX language for easier preview.

Thanks @nicentra , let me know if you have any issue