emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/eglot 44793b6e07 20/33: Fix issues #755, #401; severity


From: Stefan Kangas
Subject: [elpa] externals/eglot 44793b6e07 20/33: Fix issues #755, #401; severity not set in textDocument/publishDiagnostics
Date: Sat, 8 Jan 2022 12:30:50 -0500 (EST)

branch: externals/eglot
commit 44793b6e0756eed04735afcbb89d3803aa8562eb
Author: Stephen Leake <stephen_leake@stephe-leake.org>
Commit: Stephen Leake <stephen_leake@stephe-leake.org>

    Fix issues #755, #401; severity not set in textDocument/publishDiagnostics
    
    * eglot.el (eglot-handle-notification): Handle severity not set.
---
 eglot.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/eglot.el b/eglot.el
index bf9cf25c33..d889020912 100644
--- a/eglot.el
+++ b/eglot.el
@@ -1,6 +1,6 @@
 ;;; eglot.el --- Client for Language Server Protocol (LSP) servers  -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 2018-2020 Free Software Foundation, Inc.
+;; Copyright (C) 2018-2021 Free Software Foundation, Inc.
 
 ;; Version: 1.7
 ;; Author: João Távora <joaotavora@gmail.com>
@@ -1603,7 +1603,7 @@ Use `eglot-managed-p' to determine if current buffer is 
managed.")
                      :key #'eglot--major-mode)
             (and eglot-extend-to-xref
                  buffer-file-name
-                 (gethash (expand-file-name buffer-file-name) 
+                 (gethash (expand-file-name buffer-file-name)
                           eglot--servers-by-xrefed-file)))))
 
 (defun eglot--current-server-or-lose ()
@@ -1808,7 +1808,8 @@ COMMAND is a symbol naming the command."
                                 (point-at-eol
                                  (1+ (plist-get (plist-get range :end) 
:line)))))))
                      (eglot--make-diag (current-buffer) beg end
-                                       (cond ((<= sev 1) 'eglot-error)
+                                       (cond ((null sev) 'eglot-error)
+                                            ((<= sev 1) 'eglot-error)
                                              ((= sev 2)  'eglot-warning)
                                              (t          'eglot-note))
                                        message `((eglot-lsp-diag . 
,diag-spec)))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]