While I am typing company
shows suggestons. When I press space I want to abort suggestions and apply space, but instead it only does abort. Hence I need to press two times space to apply space.
[Q] How could I abort and apply space when company suggests completion?
(add-hook 'after-init-hook 'global-company-mode)
(setq company-auto-complete t)
(with-eval-after-load "company"
(define-key company-active-map (kbd "C-p") #'company-select-previous-or-abort)
(define-key company-active-map (kbd "C-n") #'company-select-next-or-abort)
(define-key company-active-map (kbd "C-h") #'backward-delete-char)
(define-key company-active-map (kbd ".") #'company-abort)
(define-key company-active-map (kbd "SPC") #'company-abort)
(define-key company-active-map (kbd "C-f") #'company-abort)
)
(eval-after-load 'company
'(progn
(define-key company-active-map (kbd "TAB") 'company-complete-common-or-cycle)
(define-key company-active-map (kbd "<tab>") 'company-complete-common-or-cycle)))
(setq company-frontends
'(company-pseudo-tooltip-unless-just-one-frontend
company-preview-frontend
company-echo-metadata-frontend))
(setq company-auto-complete t)
(global-set-key (kbd "C-c C-k") 'company-complete)