[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/eglot ef34797 14/54: Fix #340: Don't choke on workspace
From: |
João Távora |
Subject: |
[elpa] externals/eglot ef34797 14/54: Fix #340: Don't choke on workspace/configuration with no scopeUri |
Date: |
Thu, 16 Apr 2020 05:31:47 -0400 (EDT) |
branch: externals/eglot
commit ef347975c8327e3c50c25e1125482703b0131da2
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>
Fix #340: Don't choke on workspace/configuration with no scopeUri
* eglot.el (eglot-handle-request): Don't choke on nil scopeUri.
---
eglot.el | 31 +++++++++++++++++--------------
1 file changed, 17 insertions(+), 14 deletions(-)
diff --git a/eglot.el b/eglot.el
index a0f57f4..7133426 100644
--- a/eglot.el
+++ b/eglot.el
@@ -1678,20 +1678,23 @@ When called interactively, use the currently active
server"
(apply #'vector
(mapcar
(eglot--lambda ((ConfigurationItem) scopeUri section)
- (let* ((path (eglot--uri-to-path scopeUri)))
- (when (file-directory-p path)
- (with-temp-buffer
- (let ((default-directory path))
- (setq-local major-mode (eglot--major-mode server))
- (hack-dir-local-variables-non-file-buffer)
- (alist-get section eglot-workspace-configuration
- nil nil
- (lambda (wsection section)
- (string=
- (if (keywordp wsection)
- (substring (symbol-name wsection) 1)
- wsection)
- section))))))))
+ (with-temp-buffer
+ (let* ((uri-path (eglot--uri-to-path scopeUri))
+ (default-directory
+ (if (and (not (string-empty-p uri-path))
+ (file-directory-p uri-path))
+ uri-path
+ (car (project-roots (eglot--project server))))))
+ (setq-local major-mode (eglot--major-mode server))
+ (hack-dir-local-variables-non-file-buffer)
+ (alist-get section eglot-workspace-configuration
+ nil nil
+ (lambda (wsection section)
+ (string=
+ (if (keywordp wsection)
+ (substring (symbol-name wsection) 1)
+ wsection)
+ section))))))
items)))
(defun eglot--signal-textDocument/didChange ()
- [elpa] externals/eglot 4bd8773 23/54: Fix #339: fail when eglot-find-* finds no references, (continued)
- [elpa] externals/eglot 4bd8773 23/54: Fix #339: fail when eglot-find-* finds no references, João Távora, 2020/04/16
- [elpa] externals/eglot 76d8f49 10/54: Per #50: use completionItem/resolve more abundantly, João Távora, 2020/04/16
- [elpa] externals/eglot a6fa773 25/54: Resolve compilation warnings, João Távora, 2020/04/16
- [elpa] externals/eglot b2e4687 29/54: Close #376: add metals as the language server for Scala, João Távora, 2020/04/16
- [elpa] externals/eglot 097eed5 31/54: Close #382: new eglot-confirm-server-initiated-edits defcustom, João Távora, 2020/04/16
- [elpa] externals/eglot 2ab8b59 08/54: Don't run mode hooks in eglot--format-markup, João Távora, 2020/04/16
- [elpa] externals/eglot 88311a2 12/54: Simplify "maybe"-activation, dump "server" arg, João Távora, 2020/04/16
- [elpa] externals/eglot 7f9784c 11/54: Merge -onoff proxy code into minor mode function, João Távora, 2020/04/16
- [elpa] externals/eglot 9eac9de 16/54: Fix #341: protect against empty-string insertText in completions, João Távora, 2020/04/16
- [elpa] externals/eglot b406818 07/54: Fix #326: support workspace/configuration, João Távora, 2020/04/16
- [elpa] externals/eglot ef34797 14/54: Fix #340: Don't choke on workspace/configuration with no scopeUri,
João Távora <=
- [elpa] externals/eglot 27fb0c6 18/54: Support serverInfo of LSP 3.15.0, João Távora, 2020/04/16
- [elpa] externals/eglot 893a05a 20/54: Fix #330: ensure process starts in project's root, João Távora, 2020/04/16
- [elpa] externals/eglot 678feb9 21/54: * eglot.el (eglot-completion-at-point): Remove spurious unrelated change., João Távora, 2020/04/16
- [elpa] externals/eglot 53056a5 22/54: Fix #349: waste less space in completion annotations, João Távora, 2020/04/16
- [elpa] externals/eglot 02f71fd 26/54: Make Travis run company-specific tests, João Távora, 2020/04/16
- [elpa] externals/eglot a7a2b52 27/54: Fix #362: unbreak window/showMessageRequest, João Távora, 2020/04/16
- [elpa] externals/eglot add568b 28/54: Fix #357: allow non-standard keys in textDocument/publishDiagnostics., João Távora, 2020/04/16
- [elpa] externals/eglot 3879d57 33/54: * eglot.el (eglot-eldoc-function): Fix outdated docstring., João Távora, 2020/04/16
- [elpa] externals/eglot a4c83a6 37/54: Merge pull request #400 from joaotavora/scratch/fix-277-exit-notification, João Távora, 2020/04/16
- [elpa] externals/eglot 7c48c7a 39/54: Document the changes in column calculation, João Távora, 2020/04/16