Skip to content
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

Completion: C-k not working consistently #2974

Closed
cpaulik opened this issue Sep 10, 2015 · 18 comments
Closed

Completion: C-k not working consistently #2974

cpaulik opened this issue Sep 10, 2015 · 18 comments
Assignees

Comments

@cpaulik
Copy link
Contributor

cpaulik commented Sep 10, 2015

C-j and C-k are bound to select completion candidates. But after the company quickhelp window popped up C-k is no longer working correctly. It is only producing ^K in the buffer.

Disabling company-quickhelp is a partial workaround but the same problem happens after pressing C-d to get to the documentation.

company-mode/company-quickhelp#17 suggested a possible solution of putting the keybindings into the company-completion-finished/cancelled/started-hook's but this did not work for me.

@nixmaniack
Copy link
Contributor

This works pretty fine with me in hybrid state.

(evil-define-key 'hybrid company-active-map (kbd "C-j") 'company-select-next)
(evil-define-key 'hybrid company-active-map (kbd "C-k") 'company-select-previous)

@StreakyCobra
Copy link
Contributor

@nixmaniack With company-quickhelp-mode activated?

@nixmaniack
Copy link
Contributor

@StreakyCobra I have auto-completion-enable-help-tooltip set to t which activates company-quickhelp-mode if I'm not wrong. So yes.
A point to be noted, I've only used this with hybrid style though.

@StreakyCobra
Copy link
Contributor

Ok, so it may be a clue about the bug :-)

@al3xandru
Copy link

Updating this ticket with what I've learned on #5817:

  1. company-quickhelp-mode seems to be on (value is t). Is this enabled by setting auto-completion-enable-help-tooltip?
  2. if auto-completion-enable-help-tooltip is nil then C-k seems to work as expected.
  3. based on the above, after setting the following, C-k continues to behave as expected:
(evil-define-key 'insert company-quickhelp-mode-map (kbd "C-k") 'company-select-previous)

@abcdw
Copy link

abcdw commented Aug 4, 2016

@al3xandru thanks for workaround.

@d12frosted
Copy link
Contributor

Fixed with released of Spacemacs v0.200. Let us know if you still have any problems with this issue.

@cmlaverdiere
Copy link

Still happens to me.

@abcdw
Copy link

abcdw commented Feb 9, 2017

@d12frosted Reopen this issue plz.

@eullerborges
Copy link

eullerborges commented Jul 17, 2017

Seconding @cmlaverdiere, still happens to me. Even after the fix suggested by @al3xandru after waiting about a second without making a choice (although I can navigate upwards when there's no wait).

Edit: It starts to fail when the documentation popup shows, which takes a little while (about a second, which I described above). Also, spacemacs often crashes after inserting ^K

@malchmih
Copy link
Contributor

@eullerborges @cmlaverdiere @abcdw Workaround mentioned here works for me: company-mode/company-quickhelp#63 (comment)

  (add-hook
   'company-completion-started-hook
   (lambda (&rest ignore)
     (when evil-mode
       (when (evil-insert-state-p)
         (define-key evil-insert-state-map (kbd "C-k") nil)))))

@eullerborges
Copy link

@malchmih Works like a charm. Thanks a lot.
I'm having problems with spacemacs crashing with SIGSEV (somehow related to auto-complete and anaconda), but I get not output in the terminal I've launched it from. Do you know of any ways to log the crash info?

@sdwolfz
Copy link
Contributor

sdwolfz commented Jul 19, 2017

@FieryCod
Copy link
Contributor

FieryCod commented Apr 9, 2018

@TheBB Are there any plans to include @malchmih suggestion to the develop branch? This issue definitely should be reopened.

@richarddewit
Copy link

Spongebob's narrator: "One Year Later"

While the workaround by @malchmih works, this is still an issue in the latest develop (commit b00767c)

@sdwolfz
Copy link
Contributor

sdwolfz commented Apr 11, 2019

If somebody opens a PR with it then we can merge it. We have more active maintaiers now so it should not take long.

@smile13241324
Copy link
Collaborator

Merged the fix from duianto on develop just now. @cpaulik would you mind checking that this solves the issue for you and close it when it does?

On my system it solved the issue in emacs and python mode.

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!

@github-actions github-actions bot added the stale marked as a stale issue/pr (usually by a bot) label Oct 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests