Re: [GNU ELPA] New package: flymake-harper
Juri Linkov <[email protected]>
| Newsgroups | gmane.emacs.devel |
|---|---|
| Organization | LINKOV.NET |
| Message-ID | <[email protected]> |
>> 'harper-ls' has a code action for quick fixes that >> suggests fixes for the selected error. But integration >> with eglot is more uncertain. > > What do you mean? Have you ever tried this particular one? I meant trying to implement the same UI as flyspell-mode for spell-checking by harper. > I use tons of LS's (unfortunately, for debugging Eglot) and they > largely work consistently with `eglot-code-actions`. I use Eglot code actions all the time, and they work nicely. >> Only someone with a wide overview of capabilities of many LSP servers >> can find a common denominator for all auto-correction tools because >> server capabilities differ wildly. > > Do you really mean that? For auto-correction specifically, the > denominator is usually, if not always, the 'codeActionProvider' > capability. Code actions, to be precise, are how LSP associates > arbitrary changes to regions in a document. It's a fairly narrow and > well understodd part of LSP (and Eglot). I know. What I meant is trying to implement flyspell-like UI specifically for autocorrection that e.g. displays a list of suggested replacements, and after selecting a candidate replaces a misspelled word with the selected candidate. I don't know how easy is to customize Eglot actions to implement a different UI for selecting an action with some parameters (e.g. a list of corrected words), and performing the action. >> For example, some use "textDocument/formatting" with 'eglot-format' >> for auto-corrections, > > Who? What LS? That entry point is strictly for non-semantic whitespace > changes. I have looked at this, but didn't finish testing: https://docs.rubocop.org/rubocop/latest/usage/lsp.html#autocorrection