GNU bug report logs - #67870
29.1; Eglot missing or un-findable advertised feature

Previous Next

Package: emacs;

Reported by: Dave Abrahams <dave <at> boostpro.com>

Date: Sun, 17 Dec 2023 19:40:02 UTC

Severity: normal

Found in version 29.1

Done: João Távora <joaotavora <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: João Távora <joaotavora <at> gmail.com>
To: Dave Abrahams <dave <at> boostpro.com>
Cc: 67870 <at> debbugs.gnu.org
Subject: bug#67870: 29.1; Eglot missing or un-findable advertised feature
Date: Mon, 18 Dec 2023 17:00:27 +0000
On Sun, Dec 17, 2023 at 7:40 PM Dave Abrahams <dave <at> boostpro.com> wrote:

> The info page for Eglot says:
>
> 3.1 Eglot features:
>
>    • On-the-fly diagnostic annotations with server-suggested fixes, via
>      the Flymake package (*note (flymake)Top::).
>
> But I can find no evidence of the support for server-suggested fixes
> either in flymake or in eglot itself.  I am working with an LSP server
> that offers fix-its but can't find any way to apply them.

Isn't very hard to find in "3.3 Eglot commands" IMO

‘M-x eglot-code-actions’
‘M-x eglot-code-action-organize-imports’
‘M-x eglot-code-action-quickfix’
‘M-x eglot-code-action-extract’
‘M-x eglot-code-action-inline’
‘M-x eglot-code-action-rewrite’
     These commands allow you to invoke the so-called “code actions”:
     requests for the language server to provide editing commands for
     correcting, refactoring or beautifying your code.  These commands
     may affect more than one visited file belonging to the project.

     The command ‘eglot-code-actions’ asks the server if there [are] any code
     actions for any point in the buffer or contained in the active
     region.  If there are, you have the choice to execute one of them
     via the minibuffer.

     A common use of code actions is fixing the Flymake error
     diagnostics issued by Eglot (*note (flymake)Top::).  Clicking on a
     diagnostic with ‘mouse-2’ invokes ‘eglot-code-actions-at-mouse’
     which pops up a menu of available code actions.  The variable
     ‘eglot-diagnostics-map’ can be used to control the mouse binding.

     Other commands execute a specific code action.  For example,
     ‘eglot-code-action-organize-imports’ rearranges the program's
     “imports”--declarations of modules whose capabilities the program
     uses.

> Either what's meant by this should be clarified, leading to discoverable
> instructions for exploiting the feature, or the text should be removed.

That's just a summarized list of the main features, a detailed description
doesn't of how to use the feature doesn't belong there.  But patches welcome for
a link down to 3.3 (and fixing the typo while you're at it).

João




This bug report was last modified 1 year and 178 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.