Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

read content of keywords.txt for text highlights #613

Closed
aster94 opened this issue Jul 21, 2018 · 7 comments
Closed

read content of keywords.txt for text highlights #613

aster94 opened this issue Jul 21, 2018 · 7 comments

Comments

@aster94
Copy link
Contributor

aster94 commented Jul 21, 2018

hello,
arduino uses a file inside the library folder caller "keywords.txt" used to generate some highlights for the function's names, costants, class and more

please see:
https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification#keywords

here there is the arduino core keywords.txt:
https://github.com/arduino/Arduino/blob/master/build/shared/lib/keywords.txt

here an example from a library i wrote:
https://github.com/aster94/GoProControl/blob/master/keywords.txt

@VincentChalnot
Copy link

+1 This would be a very interesting feature 👍

@Sneezry
Copy link
Member

Sneezry commented Aug 14, 2018

VS Code seems not support dynamical syntax highlighting currently. We leave this issue in backlog and ask VS Code team if they can do something for this feature request.

@Sneezry Sneezry added this to the Backlog milestone Aug 14, 2018
@aster94
Copy link
Contributor Author

aster94 commented Aug 14, 2018

What do you mean exactly with "dynamical"? Would it be possible to load it only at startup of vscode?

Arduino IDE load all the keywords.txt files only at startup, a similar behaviour would be ok

@Sneezry
Copy link
Member

Sneezry commented Aug 14, 2018

Keywords needs be pre-defined in the extension in package.json, but not load from external files.

See https://code.visualstudio.com/docs/extensionAPI/language-support#_syntax-highlighting

@aster94
Copy link
Contributor Author

aster94 commented Aug 20, 2018

mmm clear, ok let's see what can be done

@elektronikworkshop
Copy link
Contributor

Just saw this as I'm currently working hard on a proper IntelliSense implementation (currently alpha testing), see #438 and my branch notes. This will become obsolete as soon as latter is integrated. keywords.txt is a dirty hack of the Arduino IDE to work around the lack of something powerful as IntelliSense.

Added it to my list of related issues.

Regards,
EW

@robotdad
Copy link
Member

Agree with @elektronikworkshop, IntelliSense features, which need improvement, should provide the same but better functionality than the keywords.txt file. Reactivate if there is something I'm missing in this request.

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

6 participants