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
start using new codemirror completion #4988
Conversation
there are probably also some aligning bug to send upstream to codemirror when completing near edge of screen. |
This need a (one line) patch to CM, to work, and (should) fail gracefully on normal version. You cannot press tab to complete to the longuest prefix of completion without the patch. |
So Just to keep you guys updated why this. Current completer was completely broken (preventing user to type) So I had to re-write most if not all of the things. First thing, if you extend Second Third, completion does not include analysis of surrounding tokens anymore for the time beeing, I'll need to rework some of the internal to allow that again. @ellisonbg I still need help when completer is dismissed with This is a lot of change close to release but I think it is needed and the experience is much better that current and old completer. This also layout ground to allow things like modification of completer like IfSharp does (icon in front of completion + tooltip for currently highlighted completion) Please test and feedback ! Thanks ! |
@Carreau How does this change the messaging protocol, if at all? The only thing IHaskell did was use the |
@gibiansky only client side. I just thought you were patching to trigger completion on other keypress than tab. |
Re-added options to complete from surrounding tokens. Deactivated on CM <= 3.21.1 because of bug. |
I've also been diving into CodeMirror / IPython interaction, so just adding myself to this PR to keep track of it. |
With master codemirror this should mostly work and be (depending on use cases) being equivalent to previous completer on 95% of cases. The few edge cases I can think of are :
There are other annoying related things due to the fact that completion from the kernel do not come with a |
@ivanov, do you want to bind completion to Ctrl+N and check that esc does not interfere with vim mode ? |
* TODO: remove once we update codemirror. | ||
**/ | ||
var recent_cm = function(CodeMirror){ | ||
return true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this line before merge. Use only when testing with dirty submodule and a master CM.
Painfull rebase 😡. |
I'm sure I already fixed that, don't understand why, lots of commits missing
Looks like this needs another rebase 😦 However, if I were you I would wait to rebase till #5297 gets merged, because it lightly touches the completer. |
Sure, anyway this is 3.0 material. |
closing in favor of issue #6031. |
Should start fixing as you type completion.
This use the brand new completion-hint introduced by codemirror short after I wrote the completer.
it automatically handle the "as you type".
The only annoying things I see and I'm not sure how to handle :
TODO before merge :