]> git.eshelyaron.com Git - emacs.git/commit
Eglot: in eglot-code-action-indications, make 'margin' interactive
authorJoão Távora <joaotavora@gmail.com>
Wed, 29 Jan 2025 08:33:54 +0000 (08:33 +0000)
committerEshel Yaron <me@eshelyaron.com>
Thu, 30 Jan 2025 18:13:17 +0000 (19:13 +0100)
commit4742fab0482448ecb08f08536d53fd12d05f5261
treecc86b1292f58b79196151b56eea3b6c1f69c0e89
parent65a0e2071ac25c9d536c286fde9375e942030fc9
Eglot: in eglot-code-action-indications, make 'margin' interactive

Didn't know it was possible, thanks to Ergus <spacibba@aol.com> for the
tip about binding [left-margin mouse-2] in the keymap.

The technique adopted in 'eglot-mouse-call' possibly still doesn't work
very well if the margin thing we're clicking on is not on the line point
is currently on.  But we don't have that problem (yet?) because LSP
action suggestions function mostly on a "at point" basis.

* lisp/progmodes/eglot.el (eglot-code-action-indications): Adjust docstring.
(eglot--mouse-call): Don't go anywhere except in text area.
(eglot-diagnostics-map): Bind eglot-mouse-actions to left-margin.

(cherry picked from commit e2ff77052da91e662bbd3cb19a742604db742d32)
lisp/progmodes/eglot.el