Add company C-p and C-n bindings
This commit is contained in:
parent
2a63e5f9e5
commit
cebb82f39e
3 changed files with 8 additions and 9 deletions
|
|
@ -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)
|
||||||
|
|
|
||||||
|
|
@ -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)
|
||||||
|
|
|
||||||
8
20web.el
8
20web.el
|
|
@ -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)
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue