Ensure idempotent company-dict init
This commit is contained in:
parent
3801da0db1
commit
1fe1758335
1 changed files with 2 additions and 2 deletions
|
@ -62,10 +62,10 @@ MODES should be one major-mode symbol or a list of them."
|
||||||
(def-package! company-dict
|
(def-package! company-dict
|
||||||
:commands company-dict
|
:commands company-dict
|
||||||
:config
|
:config
|
||||||
;; Project-specific dictionaries
|
|
||||||
(defun +company|enable-project-dicts (mode &rest _)
|
(defun +company|enable-project-dicts (mode &rest _)
|
||||||
|
"Enable per-project dictionaries."
|
||||||
(if (symbol-value mode)
|
(if (symbol-value mode)
|
||||||
(push mode company-dict-minor-mode-list)
|
(cl-pushnew mode company-dict-minor-mode-list :test #'eq)
|
||||||
(setq company-dict-minor-mode-list (delq mode company-dict-minor-mode-list))))
|
(setq company-dict-minor-mode-list (delq mode company-dict-minor-mode-list))))
|
||||||
(add-hook 'doom-project-hook #'+company|enable-project-dicts))
|
(add-hook 'doom-project-hook #'+company|enable-project-dicts))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue