[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/eglot 64da240 19/22: Fix #196: run connection hooks wit
From: |
João Távora |
Subject: |
[elpa] externals/eglot 64da240 19/22: Fix #196: run connection hooks with proper dir-locals |
Date: |
Sat, 5 Jan 2019 09:31:05 -0500 (EST) |
branch: externals/eglot
commit 64da240c45228a126dc22a10c8d4123b5bc4f6c4
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>
Fix #196: 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.
---
eglot.el | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/eglot.el b/eglot.el
index 4416e52..39f4842 100644
--- a/eglot.el
+++ b/eglot.el
@@ -840,8 +840,11 @@ This docstring appeases checkdoc, that's all."
(lambda ()
(setf (eglot--inhibit-autoreconnect
server)
(null eglot-autoreconnect)))))))
- (run-hook-with-args 'eglot-connect-hook server)
- (run-hook-with-args 'eglot-server-initialized-hook
server)
+ (let ((default-directory (car (project-roots
project)))
+ (major-mode managed-major-mode))
+ (hack-dir-local-variables-non-file-buffer)
+ (run-hook-with-args 'eglot-connect-hook server)
+ (run-hook-with-args 'eglot-server-initialized-hook
server))
(eglot--message
"Connected! Server `%s' now managing `%s' buffers \
in project `%s'."
- [elpa] externals/eglot d77b447 04/22: Adjust active param highlighting in first line of signature (2/3), (continued)
- [elpa] externals/eglot d77b447 04/22: Adjust active param highlighting in first line of signature (2/3), João Távora, 2019/01/05
- [elpa] externals/eglot ef95839 05/22: Adjust active param highlighting in first line of signature (3/3), João Távora, 2019/01/05
- [elpa] externals/eglot 64c7605 03/22: Adjust active param highlighting in first line of signature (1/3), João Távora, 2019/01/05
- [elpa] externals/eglot e8b9cbf 16/22: Slightly simplify eglot-completion-at-point, João Távora, 2019/01/05
- [elpa] externals/eglot d5521e9 12/22: Remove workaround for company bug that has been fixed, João Távora, 2019/01/05
- [elpa] externals/eglot d167c80 15/22: Fix #190: actually make completion sorting work, João Távora, 2019/01/05
- [elpa] externals/eglot 476feb8 07/22: Add edebug specs to destructuring macros, João Távora, 2019/01/05
- [elpa] externals/eglot b8a8901 09/22: Fix #187: be more careful when making xref summaries, João Távora, 2019/01/05
- [elpa] externals/eglot 2f0e51a 13/22: Per #188: use gfm-view-mode, João Távora, 2019/01/05
- [elpa] externals/eglot b393c48 14/22: Fix previous commit where workaround had been removed, João Távora, 2019/01/05
- [elpa] externals/eglot 64da240 19/22: Fix #196: run connection hooks with proper dir-locals,
João Távora <=
- [elpa] externals/eglot af9dcad 10/22: Take over Flymake and Eldoc completely while managing buffers, João Távora, 2019/01/05
- [elpa] externals/eglot 5b9a164 01/22: Per #180: frame lsp-mode.el comparison as historical even more evidently, João Távora, 2019/01/05
- [elpa] externals/eglot 7b0d845 17/22: Close #195: remove a hard dependency on flymake-mode, João Távora, 2019/01/05
- [elpa] externals/eglot 923cbbe 08/22: Don't make bogus responses to client/(Un)RegisterCapability, João Távora, 2019/01/05
- [elpa] externals/eglot 85711cc 11/22: * eglot.el (Package-Requires): Require jsonrpc 1.0.7., João Távora, 2019/01/05
- [elpa] externals/eglot 1e1665e 06/22: Rewrite eglot--sig-info a bit for readability, João Távora, 2019/01/05
- [elpa] externals/eglot e65792f 18/22: Close #197: allow read-only modes for markup rendering, João Távora, 2019/01/05
- [elpa] externals/eglot c5dea9a 20/22: * eglot.el (eglot-workspace-configuration): Safe when listp., João Távora, 2019/01/05
- [elpa] externals/eglot 83f7f84 21/22: Appease checkdoc, João Távora, 2019/01/05
- [elpa] externals/eglot 35597d2 22/22: Handle (un)registerCapability requests via generic functions, João Távora, 2019/01/05