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

Use custom scopes for syntax highlighting #175

Open
furrykef opened this issue Sep 7, 2022 · 1 comment
Open

Use custom scopes for syntax highlighting #175

furrykef opened this issue Sep 7, 2022 · 1 comment

Comments

@furrykef
Copy link

furrykef commented Sep 7, 2022

I wasn't crazy about the default syntax colors, so I went to tweak them, and I found it rather strange that, for example, constant.numeric is used for scene transitions. There is no semantic connection between a scene transition in Fountain and a numeric constant in a language like C++, so it doesn't seem appropriate to use them. On the other hand, comment.block is quite appropriate for notes ([[like this]]) and boneyards (/* like this */), since they both act like comments. (I do wonder, though, if they should nonetheless have separate scopes, since they are not semantically equivalent.)

This way, for example, if one day you decide you want to change what color you use for numeric constants in (say) C++, Java, and Ruby, you can do it without also changing the color of your scene transitions in Fountain (without having to define an extra rule just for Fountain). It makes sense that the token 123 should have the same color in those three languages; it doesn't make so much sense to me that the phrase (to Sally) in a screenplay should necessarily be that color as well.

@piersdeseilligny
Copy link
Owner

Hi @furrykef , thanks for the feedback!

So you're correct that the scopes don't really make a ton of sense, but the reason I used them was simply based on the colours and what I thought looked good with most of the default and popular themes (although I do realise it's subjective haha).

The issue is that there aren't really any scopes that would make sense, given how unique fountain is (even compared to markdown). What scopes would you suggest using/replacing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants