html: set company min. prefix length to 0 for company-web backend

for more info: https://github.com/osv/company-web/issues/4
This commit is contained in:
syl20bnr 2016-12-31 00:14:30 -05:00
parent e1efeea5d6
commit ab34cc2d9d
2 changed files with 8 additions and 1 deletions

View file

@ -14,3 +14,8 @@
(if (bound-and-true-p yas-minor-mode)
(call-interactively 'emmet-expand-yas)
(call-interactively 'emmet-expand-line)))
;; see https://github.com/osv/company-web/issues/4
(defun spacemacs//company-web-minimum-prefix-length ()
"Set company minimum prefix length to 0 for the current buffer only."
(set (make-local-variable 'company-minimum-prefix-length) 0))

View file

@ -175,7 +175,9 @@
(use-package web-mode
:defer t
:init
(push '(company-web-html company-css) company-backends-web-mode)
(progn
(push '(company-web-html company-css) company-backends-web-mode)
(add-hook 'web-mode-hook 'spacemacs//company-web-minimum-prefix-length))
:config
(progn
(spacemacs/declare-prefix-for-mode 'web-mode "me" "errors")