digitallyserviced/semanticolor

Identifiers not colored consistenly.

Closed this issue · 12 comments

See screen capture below. For example, 'numTriangles' in function1 is one color in the function signature and another when used in the function.

Have tried .c, .cpp, .glsl and .csh files and all have the same issue.

semanticolor

Would it be possible to provide a developer tools 'inspection' of these variables?

META+ALT+I i think it is (on mac it is cmd+alt+i) to open the dev inspector

Then click the magnifying glass in the top left of the developer tools. Select one variable, screenshot the selected element and a bit of the surrounding elements... then do the same for the other variable that is colored differently and another screenshot including its element and a bit of the surrounding.

I have seen this occur sometimes when other modules end up altering the actual content of the tags, causing one to include the a <comma><space> in the variable name leading it to calculate it as a different string.

From C source

Signature

semanticolor_c_signature

Usage

semanticolor_c_inblock

From GLSL source

Signature

semanticolor_glsl_signature

Usage

semanticolor_glsl_inblock

You mentioned other plugins. For the screenshot below I renamed my .atom directory, installed semanticolor only and then re-took the C source screenshots.

semanticolor_c_signature_nootherplugins

semanticolor_c_inblock_nootherplugins

Interesting. I see. Well I guess it is not other plugins causing it. But apparently Atom is not consistently parsing the source. I had not tested this using the source languages you are using. Mainly JS, PHP, HTML,CSS and other scripted languages.

Will investigate a bit further on my end. Thank you.

I'm using python and it doesn't work but I was looking for this for ages, please makes this happen. I have a lot of plugins by the way.. Not sure what's wrong

I have a fresh install, plus semanticolor. In a simple python function, this happened:
screen shot 2016-04-14 at 4 56 39 pm
The function is recursive, but at least all of the calls to the function are the same color, even if the definition is another one.

@mwchase Sorry... I gave up on Atom as an editor. It's tokenizer is absolutely garbage and cannot seem to properly tokenize things to make the semanticolor addon work properly.

I have reverted to sublime text as it is much more stable and provides a much more performant tokenizer and actually does it properly.

Same.

On Mon, 25 Apr 2016 at 14:00 Chris notifications@github.com wrote:

@mwchase https://github.com/mwchase Sorry... I gave up on Atom as an
editor. It's tokenizer is absolutely garbage and cannot seem to properly
tokenize things to make the semanticolor addon work properly.

I have reverted to sublime text as it is much more stable and provides a
much more performant tokenizer and actually does it properly.


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#3 (comment)

Frantisek Hetes, iOS Developer, Makeschool student
f.hetes@gmail.com f.hetes@gmail.com | @ferbini | makeschool.com
http://makeschool.com

@xcezzz I doubt that Atom's tokenizer is at fault here. The problem—at least for me—is that Semanticolor is treating, for example, this and (this as different identifiers (in JS), even though Atom correctly tokenizes the this in both.

@xcezzz You should probably mark this package as abandoned in the README if you are no longer working on it.

@sharedprophet I have accepted a pull request from him that he said fixed and updated some of the issues. I do not have much time to test. Publishing his version now please confirm if resolved.

#6

I got a chance to quickly test in PHP, JS, CSS, HTML after #6 ... looks great!

Published for updates on atom.io