The completions system is entirely disconnected from the language syntax system, meaning that data is duplicated between them. For instance, the C truffle has a list of stdlib functions that is also present in the completions file, albeit in a different format (regex vs. JSON).
I'm not sure what to do to fix this, but making completions less disconnected from everything else would definitely be a start. There could also be a generic file location in truffles that could be accessed by both the completion engine and the syntax definitions, where you could define arrays of symbols.
The solution to this, I think, is "semantic highlighting". Allow the highlighting system to access the indexing system and highlight words from it. Xcode does this.
The completions system is entirely disconnected from the language syntax system, meaning that data is duplicated between them. For instance, the C truffle has a list of
stdlib
functions that is also present in the completions file, albeit in a different format (regex vs. JSON).I'm not sure what to do to fix this, but making completions less disconnected from everything else would definitely be a start. There could also be a generic file location in truffles that could be accessed by both the completion engine and the syntax definitions, where you could define arrays of symbols.