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-modeand withhtml-mode. But withemacs-lisp-modeand withlisp-interaction-mode,hippie-expandalways 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-hookandsgml-mode-hook). Is the right way to fix this to changehippie-expand-try-functions-listonprog-mode-hookdepending on the current major mode?
How can I setup hippie-expand with emmet and yasnippet to fix these 2 issues?