summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoão Távora <joaotavora@gmail.com>2023-07-02 11:57:15 +0100
committerJoão Távora <joaotavora@gmail.com>2023-07-02 11:58:04 +0100
commitc2e4c68333d72a342bb531449412a424b3507a65 (patch)
tree57f4cb227f800bce090c24667ae3ab2db0d9f030
parent59a350cb911a1c488635d1eb447b07a509939125 (diff)
downloademacs-c2e4c68333d72a342bb531449412a424b3507a65.tar.gz
Eglot: another tweak to eglot--sig-info
Going to the start of the first param and skipping non-word syntax backward would seem to be the right thing to do, for traditional C-style languages and also languages like Ocaml where function signatures don't start the param list with '('. See also https://github.com/joaotavora/eglot/discussions/1251. * lisp/progmodes/eglot.el (eglot--sig-info): Rework again.
-rw-r--r--lisp/progmodes/eglot.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
index 897cf3bc93e..f09c348143d 100644
--- a/lisp/progmodes/eglot.el
+++ b/lisp/progmodes/eglot.el
@@ -3212,7 +3212,7 @@ for which LSP on-type-formatting should be requested."
parameter
(when (zerop i)
(goto-char (elt parlabel 0))
- (search-backward "(" nil t)
+ (skip-syntax-backward "^w")
(add-face-text-property (point-min) (point)
'font-lock-function-name-face))
;; ...perhaps highlight it in the formals list