-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
completions comments #14
Comments
So, I should clarify that all the system is meant to do is find the right context (latex, module, function etc.) and give you all possible completions, while filtering and ranking is left to the front end. It would definitely be nice to implement the filtering/ranking done in pure Julia at some point, but I haven't needed this yet and I think in your case it will make the most sense to take advantage of Sublime's great fuzzy searching. So in your example the idea would be to provide Sublime with all 1400 completions once, even with spurious completions like "try" and "while", so that if the user deletes the About the type consistency, I can definitely look into that, but can I ask why you need it to be more consistent? Since there's no real processing being done on them before passing them off it shouldn't be a performance issue. |
That makes sense and I actually figured out how to hook into Sublime's completions which does the fuzzy matching, so that makes sense. About the type consistency, it's actually to make parsing the results easier. Basically, I'm passing in the call for completions to julia and then reading the output on One more thought, could we look into precompiling the |
Ok, fair enough. I'll take a look at where the type instability is coming from. Some more precompilation would definitely be nice. It should just be a case of calling the |
Yeah, I think so. All of Base's precompilation is in |
Actually, would it be OK just to convert it to an The main issue is that completions come from a large number of places, including user-defined completion functions, so enforcing a specific type across all of them is a bit tricky. Also, note that it's possible for completions to be a list of Dicts rather than strings. This is there to support LaTeX completions, where the displayed text is different from the inserted text, but I could add a flag to disable LaTeX completions if you want it. |
So I've been playing around with the
allcompletions
code as we talked about for Sublime-IJulia and I had a few comments/requests:[:hints]
be made more consistent? From playing around with it, it seems like the result is sometimes an array of ASCIIString, sometimes UTF8String, and sometimes just an Any array. This is probably because a comprehension or map or something is being used. I can look into it more, but I figured you may know where the return array code is and could pre-allocate a consistent typeAny idea why things like
try
orwhile
are coming up as completions forP
? It might also be good to be able to specify a cap limit on the number of completions to return.The text was updated successfully, but these errors were encountered: