Bug 354461

Summary: Cannot disable autocompletion popups
Product: [Applications] kdevelop Reporter: Martin Klapetek <mklapetek>
Component: generalAssignee: kdevelop-bugs-null
Status: RESOLVED FIXED    
Severity: normal CC: bjsenya, kfunk, l.jirkovsky, olivier.jg
Priority: NOR    
Version First Reported In: git master   
Target Milestone: 5.0.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Screenshot
Video

Description Martin Klapetek 2015-10-27 15:47:04 UTC
Created attachment 95163 [details]
Screenshot

These are all off:

Language Support -> Code Completion -> Enable automatic invocation
Language Support -> Code Completion -> Additional info for current item
Language Support -> Code Completion -> Detailed Completion: When invoked manually
Language Support -> Code Completion -> Highlight semantic problems
Language Support -> Code Completion -> Highlight problematic lines

Language Support -> Clang Language Support -> Add macros to code-completion
Language Support -> Clang Language Support -> Enable Look-ahead code-completion
Language Support -> Clang Language Support -> Forward declare assistant

Editor -> Editing -> Auto Completion -> Enable auto completion
Editor -> Editing -> Auto Completion -> Auto Word Completion
Editor -> Editing -> Auto Completion -> Keyword completion

...and I'm still getting random popups, which are just useless, see attachement. Mostly this happens when navigating with arrows through the document, eg. going down and suddenly I'm going down in a completion popup.

I would like to simply disable /all/ auto-completion popups. Ideally also with a single checkbox rather than with 11:) This is with git master of 5.0 branch.

Bonus points if you can make "auto completion" consistent (sometimes it's with dash, sometimes not).
Comment 1 Martin Klapetek 2015-10-27 17:43:17 UTC
Created attachment 95167 [details]
Video

Furthermore, here's a short video of how coding with all auto completion options turned off looks like.

I only typed what you see in the video, didn't press the completion keyboard shortcut at all. The ending part is just moving around with arrows, notice how it constantly comes up.
Comment 2 Milian Wolff 2015-10-28 15:01:45 UTC
Olivier, I think this is due to your changes with the assistants popup. Any idea what we can do to improve this situation?
Comment 3 Oleksandr Senkovych 2015-10-28 15:14:19 UTC
Personally I just resolved this problem for me with this change: https://gist.github.com/blackjack/9673db132f384c1fee72 but it's a quick hack rather than a proper fix. 

Looking forward for developers to fix it properly.
Comment 4 Milian Wolff 2015-11-01 17:34:52 UTC
For 5.0, I now reverted the commits that removed the assistants popup and pushed the data into the code completion list. For master, I'll disable the automatic invocation of the code completion similar to the patch from Oleksandr. I still think that removing the assistants and showing the data in the code completion is a super cool idea. But we clearly need some more time to make it work properly.

Comments?
Comment 5 Olivier.jg 2015-11-01 17:55:48 UTC
Assuming that integration into the completion results is a generally desirable feature, we need:

To implement KTextEditor::CodeCompletionModelControllerInterface for the assistants model and give obvious implementations to such things as shouldAbortCompletion (always return false), and shouldStartCompletion (whenever if we have assistants).  Possibly a couple others.

With that in place should use KTextEditor::startCompletion instead of the private slot invokation, but not in all cases when the assistant is updated, maybe only when entering a line with assistants? Likely also checking if CodeCompletionInterface::isCompletionActive otherwise you'll get flickering as results get reloaded.

Then there's the real work. Every other backspace will dismiss the assistant -- very nasty for renaming, no known workaround (other than the private slot).
It's important to ensure that the assistant model doesn't force a reload of the other models, as this makes things slow and ugly.

In a world full of good things someone will implement a CodeCompletionInterface2 for Kate 5 that isn't unfortunate. Barring that, it's a matter of finding just the right combination of these controller overloads and invocations to make it barely acceptable :(.
Comment 6 Milian Wolff 2015-11-14 20:10:05 UTC
in the 5.0 branch this is "fixed", thus I'll remove the release_blocker flag.
Comment 7 Kevin Funk 2016-03-09 07:52:38 UTC
Same for master. Change has been reverted => Fixed.