Skip to content

Conversation

moozzyk
Copy link
Owner

@moozzyk moozzyk commented Sep 26, 2016

No description provided.

@TypicalFooBar
Copy link

I tested this out today and found that it does work for the most part.

One thing I noticed is that the function names do not always highlight correctly. Let me show you a couple of images to show you what I mean.

The image below shows the function digitalWrite() - here I have not yet put the parenthesis and the syntax highlighting works as expected.
image

The image below shows the function digitalWrite() - at this point I have added the parenthesis and the syntax highlighting no longer works in this case.
image

Here is another example using Serial.println()
image
image

Also, some other functions don't seem to always highlight - note, as well, that the max and min functions are highlighted, but will not be once the parenthesis are added. I didn't test every function, but I'm sure there are more that behave the same way.
image

I'm not sure how to fix this, but hopefully this little bit of testing will help! :)

@moozzyk
Copy link
Owner Author

moozzyk commented Oct 2, 2016

@TypicalFooBar - thanks for checking this out. Your comments and screenshots are really helpful. For whatever reason I could not see any coloring but for consts (i.e. HIGH etc.) so was not sure what was going on. Now I can see that what I did is a step in the right direction.

@mariusstrom
Copy link

Yep, I'm seeing the exact same as @TypicalFooBar, so we (err, you :)) seem to be making progress. Unfortunately I don't know how VSCode extensions work in the backend so I'm not really of much assistance in getting to the ultimate solution.

@moozzyk
Copy link
Owner Author

moozzyk commented Oct 6, 2016

I actually played with this a little bit over the last weekend. My theory is that the base definition is winning with my definition. If you use one of the functions (e.g. acos) that are specified in both arduino and the base lang definition (in this case in the definition for C pulled in by C++) it won't get colored at all. If you use a function that is not specified in any of the base definitions it will get colored until you type ( at which point I think the base definition is winning again. Sadly, I was not able to figure out why things stopped working and how to fix this - the expression in the cpp definition seem to have been copied from the old c++ definition without changes and it worked before.

@mariusstrom
Copy link

Hmm, ok, well I don't know how it works but I do work at Microsoft so let me see if I can track down any folks on the VS Code team that might be able to look at this and provide any suggestions.

@moozzyk
Copy link
Owner Author

moozzyk commented Oct 6, 2016

LOL. I could do this myself...

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

Successfully merging this pull request may close these issues.

3 participants