I often copy and paste code/text/snippets etc. Now the code completion pops up at the caret after pasting, so when I immediately press “return” to start a new line I accidentally select whatever random thing code completion pics.
This often results in “abs” appearing as that’s the code completion default of a blank line. This is quite disruptive to workflow - who wants a code completion on paste? I don’t think it used to do this.
Please can we disable or have the option to disable? Thanks!
Even more annoying example of this new ultra-keen popup behaviour:
• if you close a text variable with ’ and press return it inserts “%%!” and doesn’t of course give you a new line!
Still happening on 3.4.1_1
I found that the automatic nature of the popup is controlled by “Enable autocompletion” in “Settings > Code Completion”.
However - another odd case where autocomplete shouldn’t appear is when commenting out a line of code: place caret in a line somewhere, press cmd+/ to comment it out, and the blasted popup appears mid-text meaning one is forced to press esc to regain control of the caret. This further trips up if I press esc twice (in frustration) and then the arrow keys (thinking I’m navigating) but actually this compresses notebook table-of-contents structure as I’ve slipped into command mode (even more annoying!).
Still happening on 3.4.1_1
As in JupyterLab 3.4? That version is ancient!
I found that the automatic nature of the popup is controlled by “Enable autocompletion” in “Settings > Code Completion”.
Yes, someone contributed this option without implementing any heuristics when the autocomplete should or should not be triggered. There is an issue for this: Poor default autocompletion heuristics · Issue #15013 · jupyterlab/jupyterlab · GitHub. It would be amazing if someone contributed a solution. I would personally love working on it but I am currently more focused on putting out fires elsewhere…
A workaround would be installing jupyterlab-lsp which has some sane heuristics included (GitHub - jupyter-lsp/jupyterlab-lsp: Coding assistance for JupyterLab (code navigation + hover suggestions + linters + autocompletion + rename) using Language Server Protocol)
2 Likes