Open Strauman opened 6 years ago
It wouldn't be possible to do this dynamically based on the document's settings, but it would be possible to color \begin{env}...\end{env}
for any value of env
. But still, it would only color those keywords, and there would be no way to have special inside highlighting.
@kylebarron I was not thinking about the document's settings, but the user settings of your amazing atom plugin. If it's not possible, then it's not possible :)
Motivation
Being able to correctly syntax-highlight own defined environments.
Example usage
Thoughts on implementation
Get the environment names from settings. Then reformat the user settings to a regex and write this regex to a file that can be included in
grammars/latex.cson
.I think that verbatim environments and math environments are the environments that I would define myself (sometimes), and I suspect that these are the ones that are most common to define yourself (as opposed to lists, tikz, etc.)