vscode-codeql icon indicating copy to clipboard operation
vscode-codeql copied to clipboard

Add new intellisense proposals for keywords

Open aeisenberg opened this issue 5 years ago • 4 comments

The extension could provide keyword proposals where appropriate. For example, in the top level, select, where, from, predicate, etc will all be available.

aeisenberg avatar Sep 09 '20 19:09 aeisenberg

Autocompleting on an empty top-level gives suggestions for boolean, class, date, float, from, import, int, select, string, where. This covers all the primitive types that could be used as the result type of a predicate declaration, and most keywords valid for top-level elements. Is that what you (/the users) spoke about, or are you referring to something more detailed as a keyword proposal?

Note there are a couple of interesting omissions: predicate and module should be suggested too, but currently are not.

adityasharad avatar Sep 14 '20 21:09 adityasharad

predicate was exactly one of them that i was thinking of. And yes, the others seem to be available.

Other things like quantifiers exist, count, etc are not available in intellisense. Part of this issue should be to enumerate what is missing. I wouldn't consider this high priority, though it's not particularly complex either.

aeisenberg avatar Sep 15 '20 17:09 aeisenberg

From a historically perspective we explicitly chose not to do this as there were objections over offering too much so we only chose a very small number of keywords to complete. In particular we didn't want to add predicate level keywords. There was a lot of comparison to other ides that do it that way.

I disagreed with that reasoning at the time and I think we should add more keywords but I though it prudent to note what we thought historically.

alexet avatar Sep 16 '20 13:09 alexet

I can understand not wanting to clutter the proposals list. Maybe as an alternative, we shouldn't propose just the keyword, but create a full template for a predicate (and other missing keywords).

aeisenberg avatar Sep 16 '20 15:09 aeisenberg