]> git.eshelyaron.com Git - emacs.git/commit
Fix Eglot's snippet insertion to follow the manual
authorJoão Távora <joaotavora@gmail.com>
Fri, 17 Mar 2023 11:47:02 +0000 (11:47 +0000)
committerJoão Távora <joaotavora@gmail.com>
Fri, 17 Mar 2023 14:17:15 +0000 (14:17 +0000)
commit6f82596b49055ad17447ee6dd51c433bd2758621
treee64c4e944c0365780a48eb15b67be6ef7f929a72
parentc54bda15e35a6e9e2232997e805ef017a15e78c8
Fix Eglot's snippet insertion to follow the manual

The manual states that YASnippet must only be installed to be useful.
Before this change, it would only work if the user happened to have
manually activated it before with 'yas-global-mode' or somesuch.

This makes Eglot's Yasnippet-activating behaviour similar to its
Flymake-activating behaviour.

* lisp/progmodes/eglot.el (eglot-client-capabilities): Consult
eglot--stay-out-of.
(eglot--snippet-expansion-fn): Turn on yas-minor-mod eon demand.
(eglot-completion-at-point): Simplify.
lisp/progmodes/eglot.el