Extending class completion to display variable/property

Discuss syntax highlighting or submit new syntax files.
Post Reply
owend
Posts: 21
Joined: 19 Jan 2020 05:42

Extending class completion to display variable/property

Post by owend »

Is it possible to extend class completion to be able to display a list of variable/property values?
This would probably be best achieved by allowing an equals symbol “=“ to trigger the completion drop down in addition to the current period trigger “.”

In the case of the reprap GCode syntax file I did recently, many of the users I expect will not be programmers so this would help them avoid syntax errors.

An example would be

if heat.heaters[1].status=“idle”
// rest of code

I want the class completion to list the various status options when the = sign is entered.

EDIT:
I thought I might be able to achieve this to an extent with hints (albeit no drop down list) however I can't seem to get hints to work at all.
Even if I select a syntax file that already has them (Java) I can't get a hint to display, only the class completion.
Post Reply