Sublime Forum

Changing the theme what type of scope are HTTP methods?

#1

I have minor inconsistencies in the material theme so I decided to fix it. I found the Material-Theme.tmTheme and Material-Theme-Darker.tmtheme and there are bunch of xml style keys and strings in it.

So after much googling I found out that there is some kind of scope naming.

I also found out https://tmtheme-editor.herokuapp.com/#!/editor/ where I can actually see what is colored in what way.

So upon inspection, the 'DELETE' keyword (used in cURL request) is purple and is marked as

keyword, storage.type, storage.modifier

but 'POST' or 'GET' don’t have any keys assigned to them.

So how do I differentiate them? That is, how to make them all the same color?

For that, I’d need some kind of similar scoped name, but I found nothing in the documentation that would work.

So what is the scoped name of the HTTP requests?

EDIT: Found few useful console comands that will fetch the scope and styling

view.scope_name(view.sel()[0].begin())

and

view.style_for_scope(view.scope_name(view.sel()[0].begin()))

First one returns the scope keywords, second the styling.

As it turns out, the DELETE is recognized as a part of sql, not php, that’s why it’s purple.

0 Likes