Emacs: make code completion menu function more like in neovim
Alan Pearce alan@alanpearce.eu
Mon, 05 Jun 2023 16:46:08 +0200
1 files changed, 3 insertions(+), 8 deletions(-)
jump to
M user/emacs/init.el → user/emacs/init.el
@@ -397,9 +397,7 @@ :config (progn (setq evil-collection-magit-use-y-for-yank nil) (general-unbind 'normal magit-mode-map "<escape>") - (evil-collection-init) - (with-eval-after-load 'company - (company-tng-mode t)))) + (evil-collection-init))) (general-create-definer my-leader-def :keymaps 'override @@ -518,11 +516,7 @@ company-dabbrev-ignore-case nil company-begin-commands '(self-insert-command) company-insertion-on-trigger #'company-explicit-action-p company-insertion-triggers '(?\ ?\( ?\) ?.)) - (global-company-mode +1) - (general-unbind company-active-map - "C-j" - "RET" - [return])) + (global-company-mode +1)) :general (:states 'insert "TAB" #'company-indent-or-complete-common @@ -530,6 +524,7 @@ "C-x C-f" #'company-files) (:keymaps 'company-active-map "TAB" #'company-complete-common-or-cycle "<tab>" #'company-complete-common-or-cycle + "C-j" nil "<M-tab>" #'company-other-backend "<C-tab>" #'company-other-backend "S-TAB" #'company-select-previous