Add company C-p and C-n bindings

This commit is contained in:
Maciej 2019-07-05 10:39:51 +03:00
parent 2a63e5f9e5
commit cebb82f39e
Signed by: maciej
GPG key ID: 41D62D42D3B0D765
3 changed files with 8 additions and 9 deletions

View file

@ -37,6 +37,11 @@
company-lsp-async 1 ;; Fetch LSP results asynchronously company-lsp-async 1 ;; Fetch LSP results asynchronously
) )
;; Use standard emacs next and previous bindings for navigating company
;; suggestions
(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)
;;; Yasnippet configuration ;;; Yasnippet configuration
(define-key prog-mode-map (kbd "C-c y") 'company-yasnippet) (define-key prog-mode-map (kbd "C-c y") 'company-yasnippet)
(define-key prog-mode-map (kbd "<f13>") 'company-indent-or-complete-common) (define-key prog-mode-map (kbd "<f13>") 'company-indent-or-complete-common)

View file

@ -1,8 +1,8 @@
;; Add erlang installation to load path ;; Add erlang installation to load path
(setq erlang-asdf-root "/Users/maciej/.asdf/installs/erlang/22.0.4/") (setq erlang-asdf-root "$HOME/.asdf/installs/erlang/21.3.8/")
(setq load-path (setq load-path
(cons (format "%slib/tools-3.2/emacs" erlang-asdf-root) (cons (format "%slib/tools-3.1/emacs" erlang-asdf-root)
load-path)) load-path))
(require 'erlang-start) (require 'erlang-start)

View file

@ -11,10 +11,4 @@
'(company-yasnippet company-lsp))) '(company-yasnippet company-lsp)))
(add-hook 'js2-mode-hook 'activate-js2-mode) (add-hook 'js2-mode-hook 'activate-js2-mode)
(add-to-list 'auto-mode-alist '("\\.tsx\\'" . web-mode))
(defun activate-web-mode ()
;; Company list override
(add-to-list (make-local-variable 'company-backends)
'(company-web-html company-yasnippet)))
(add-hook 'web-mode-hook 'activate-web-mode)