[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Adding fix suggestions to Flymake diagnostics
From: |
João Távora |
Subject: |
Re: Adding fix suggestions to Flymake diagnostics |
Date: |
Sun, 26 May 2024 21:24:52 +0100 |
On Sun, May 26, 2024 at 4:56 PM Eshel Yaron <me@eshelyaron.com> wrote:
ntext menu
>
> Yes, Flymake lets backends associate arbitrary overlay properties with
> diagnostics, but that requires backends to worry about UI stuff.
100% Agree. And indeed Eglot would like not to worry about UI, but it has
to on more than one occasion. So if you want to lift Eglot's diagnostic-fixing
things out of there, I suggest lifting them into another library that is *not*
Flymake. That library would tend to be the new refactor.el, which would
always need an "edit" concept of its own (with more or less similarities
to LSP).
Ideally refactor.el would give eglot.el a function (or more likely a macro)
to simplify what is currently done ca. lines 2287 of eglot.el ("Flymake
customization") and also a drop-in replacement (or near-drop-in) for
eglot-code-actions-at-mouse.
Flymake.el would remain ignorant of what an edit is, which is a good thing
in my book.
> I'm not suggesting to change anything about eglot-rename and friends.
Well, I'm encouraging you to :-) I gave your refactor.el a *very* cursory
read but it seems to be at least more or less the length and complexity
I envisioned such a library having. It has its own concept of edit, seems
to know how to present things as diffs, all good things. The tricky part
if I remember was how to talk to the backend about the kinds of actions
available. Maybe I'm misremembering. Anyway, refactor.el is definitely
where I would put all this with an eye to slashing great as much Eglot UI
code as possible.
João
- Adding fix suggestions to Flymake diagnostics, Eshel Yaron, 2024/05/26
- Re: Adding fix suggestions to Flymake diagnostics, João Távora, 2024/05/26
- Re: Adding fix suggestions to Flymake diagnostics, Eshel Yaron, 2024/05/26
- Re: Adding fix suggestions to Flymake diagnostics,
João Távora <=
- Re: Adding fix suggestions to Flymake diagnostics, Eshel Yaron, 2024/05/27
- Re: Adding fix suggestions to Flymake diagnostics, João Távora, 2024/05/27
- Re: Adding fix suggestions to Flymake diagnostics, Eshel Yaron, 2024/05/27
- Re: Adding fix suggestions to Flymake diagnostics, João Távora, 2024/05/27
- Re: Adding fix suggestions to Flymake diagnostics, Eshel Yaron, 2024/05/31
- Re: Adding fix suggestions to Flymake diagnostics, João Távora, 2024/05/31