Skip to content
This repository has been archived by the owner on Nov 11, 2018. It is now read-only.

Mute Methods - Avoiding the Christmas Tree Effect #6

Open
ThaisRobba opened this issue Jul 29, 2014 · 4 comments
Open

Mute Methods - Avoiding the Christmas Tree Effect #6

ThaisRobba opened this issue Jul 29, 2014 · 4 comments

Comments

@ThaisRobba
Copy link

I really like semantic highlighting - but the current implementation is a bit too crazy on colors. I can't find my variables or what is happening to them - and reading code is nearly impossible when chaining.

Muting method calls, I believe, would be extremely beneficial. On the left is the current implementation, on the right is the same code but with muted methods (using this demo http://brooks.io/syntax-highlight/v2/).
I was thinking that built-in method calls could be the same color and style as built-in keywords (so .length would be the same color as var). User-made methods could be a different shade of gray.

PS: Of course, there might be another way or a better solution. As it is, it is unusable with many frameworks.

colors

@mik01aj
Copy link

mik01aj commented Mar 23, 2015

+1

1 similar comment
@mattsawyer77
Copy link

+1

@mik01aj
Copy link

mik01aj commented Jun 19, 2015

Imho all method calls could me muted. The same for fields referenced by dot. So that the only thing that would get semantically-highlighted would be the local (or closure) variables and functions. Then we don't need any blacklists for frameworks.

@p-e-w
Copy link
Owner

p-e-w commented Jul 20, 2015

Regrettably, this is not possible with the current setup as Acorn only gives us the scope name, not whether it refers to a method or variable. We could get much, much more information if we were able to let Acorn parse instead of just tokenize, but the Atom API demands that grammars be able to process source line-by-line, which is not compatible with Acorn's parsing model.

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

No branches or pull requests

4 participants