feat(emacs): add company mode (via etags)
This commit is contained in:
parent
f0d50e0d33
commit
c27a379f28
2 changed files with 13 additions and 3 deletions
|
@ -52,7 +52,7 @@
|
|||
(local-set-key "\C-c\C-t" 'lean-eldoc-documentation-function)
|
||||
(local-set-key "\C-c\C-f" 'lean-fill-placeholder)
|
||||
(local-set-key "\M-." 'lean-find-tag)
|
||||
(local-set-key [tab] 'lean-complete-tag))
|
||||
(local-set-key [tab] 'completion-at-point))
|
||||
|
||||
(define-abbrev-table 'lean-abbrev-table
|
||||
'(("var" "variable")
|
||||
|
@ -92,7 +92,12 @@
|
|||
(remove-hook 'lean-mode-hook 'whitespace-cleanup-mode))
|
||||
;; eldoc
|
||||
(set (make-local-variable 'eldoc-documentation-function)
|
||||
'lean-eldoc-documentation-function))
|
||||
'lean-eldoc-documentation-function)
|
||||
;; company-mode
|
||||
(when lean-company-use
|
||||
(require 'company)
|
||||
(company-mode t)
|
||||
(set (make-local-variable 'company-backends) '(company-etags))))
|
||||
|
||||
;; Automatically use lean-mode for .lean files.
|
||||
;;;###autoload
|
||||
|
|
|
@ -35,6 +35,11 @@
|
|||
:group 'lean
|
||||
:type 'boolean)
|
||||
|
||||
(defcustom lean-company-use t
|
||||
"Use company mode for lean."
|
||||
:group 'lean
|
||||
:type 'boolean)
|
||||
|
||||
(defcustom lean-flycheck-checker-name "lmake"
|
||||
"lean-flychecker checker name"
|
||||
:group 'lean
|
||||
|
|
Loading…
Reference in a new issue