I use hippie-expand
with emmet
and yasnippet
.
(use-package emmet-mode
:init
(add-hook 'css-mode-hook 'emmet-mode)
(add-hook 'sgml-mode-hook 'emmet-mode)
:config (unbind-key "<C-return>" emmet-mode-keymap))
(use-package hippie-exp
:bind ("<C-return>" . hippie-expand)
:config
(setq-default
hippie-expand-try-functions-list '(yas-hippie-try-expand emmet-expand-line)))
(use-package yasnippet
:init
(add-hook 'emacs-lisp-mode 'yas-minor-mode)
(add-hook 'js-mode-hook 'yas-minor-mode)
(add-hook 'org-mode-hook 'yas-minor-mode)
(add-hook 'sgml-mode-hook 'yas-minor-mode)
:config (yas-reload-all))
It works fine with
js-mode
,org-mode
and withhtml-mode
. But withemacs-lisp-mode
and withlisp-interaction-mode
,hippie-expand
always delegate completion toemmet-expand-line
.Emmet completion is still available in non-emmet'ified buffers after an emmet'ified one has been opened (
css-mode-hook
andsgml-mode-hook
). Is the right way to fix this to changehippie-expand-try-functions-list
onprog-mode-hook
depending on the current major mode?
How can I setup hippie-expand
with emmet
and yasnippet
to fix these 2 issues?