]> git.eshelyaron.com Git - emacs.git/commit
Run connection hooks with proper dir-locals
authorJoão Távora <joaotavora@gmail.com>
Wed, 2 Jan 2019 17:12:36 +0000 (17:12 +0000)
committerJoão Távora <joaotavora@gmail.com>
Wed, 2 Jan 2019 20:29:26 +0000 (20:29 +0000)
commitf3914c266fcf81bb735e733222d6a4aa70948548
treea176dd013381aafcf1cff927e47edcf1542fdb18
parent355c9c4a656719a94e0a25a04eb913470d46b7dc
Run connection hooks with proper dir-locals

eglot-connect-hook and eglot-server-initialized-hook must run in a
buffer with properly setup directory-local variables for the project.

This is crucial for things like eglot-signal-didChangeConfiguration,
which needs a properly setup value of eglot-workspace-configuration to
succeed.

I could have chosen any of the buffers where Eglot is activating
itself, but the approach using
hack-dir-local-variables-non-file-buffer seems more correct, despite
the name.

* eglot.el (eglot--connect): Run connection hooks with proper
dir-locals.

GitHub-reference: fix https://github.com/joaotavora/eglot/issues/196
lisp/progmodes/eglot.el