Open MintPaw opened 10 years ago
This is pretty difficult to do. For top-level completions, we just use regexps to collect available variables / methods in current file, without really knowing the current scope... It's pretty much what the basic ST autocomplete does. There are possible alternatives, the most viable being to implement recent compiler based top-level completion in this case (if available).
http://i.imgur.com/ddQD8Av.png
So a month later it seems the issue is worse than I thought originally. Is there no adherence to scope at all? I thought there had been, but it seems to be failing in very basic situations.
As written previously, there is currently no adherence to scope for top-level completion (outside of .
or (
).
I don't have much time right now to look into implementing compiler based top level completion, but I'd be happy to review and merge any PR regarding this.
http://i.imgur.com/YlruEWj.png In the screenshot above that variable "castTime" is in a typedef and should not be visible on the list.