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

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

[elpa] externals/eglot 36b7cf32 38/69: Fix #272: also use signature labe


From: João Távora
Subject: [elpa] externals/eglot 36b7cf32 38/69: Fix #272: also use signature label offsets for parameter info
Date: Sun, 20 Oct 2019 08:21:49 -0400 (EDT)

branch: externals/eglot
commit 36b7cf32d9d8bbf6b1f7be8918f77994f3fb0f1d
Author: galeo <address@hidden>
Commit: João Távora <address@hidden>

    Fix #272: also use signature label offsets for parameter info
    
    According to the LSP specification, a parameter of a callable-signature
    has a label and a optional doc-commet. The label of a parameter
    information is either a string or an inclusive start and exclusive end
    offsets within its containing signature label.
    
    Previously, this was only taken in account for highlighting the
    parameter in the definition signature.
    
    * eglot.el (eglot--sig-info): Handle signature label offsets
      when printing the signature parameter information.
    
    Copyright-paperwork-exempt: yes
---
 eglot.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/eglot.el b/eglot.el
index 3155135..723ac3b 100644
--- a/eglot.el
+++ b/eglot.el
@@ -2055,7 +2055,10 @@ is not active."
                  (goto-char (point-max))
                  (insert "\n"
                          (propertize
-                          label 'face 'eldoc-highlight-function-argument)
+                          (if (stringp label)
+                              label
+                            (apply #'buffer-substring (mapcar #'1+ label)))
+                          'face 'eldoc-highlight-function-argument)
                          ": " (eglot--format-markup documentation))))))
          (buffer-string))))
    when moresigs concat "\n"))



reply via email to

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