[clangd-dev] Sending fixits to client with LSP diagnostics

Alex L via clangd-dev clangd-dev at lists.llvm.org
Fri Aug 3 14:00:44 PDT 2018


Thanks for the reply! I'll work on the patch to add the support for fix-its.

On 2 August 2018 at 03:11, Ilya Biryukov <ibiryukov at google.com> wrote:

> Hi Alex,
>
> We discussed it internally inside our team and I think everyone agrees
> that would be the right thing to do. We don't work on it currently, though,
> so no overlap on our side.
> Unfortunately, LSP does not support this, so this would be an extension.
>

> BTW, consider implementing the current scheme for fix-its that uses
> textDocument/codeAction and matches on sent diagnostics. It's not ideal, as
> it forces clangd to stash fix-its in memory. But it does work well in
> practice (we've tested only in VSCode, though).
> If you don't need to support applying diagnostics in batches, this
> approach might work well for your use-case too.
>

Unfortunately the existing scheme doesn't really work with our system. We'd
like to pass in all of the data we need in publishDiagnostics, and let the
client apply the fix-its.

Cheers,
Alex


>
>
> On Wed, Aug 1, 2018 at 10:19 PM Alex L via clangd-dev <
> clangd-dev at lists.llvm.org> wrote:
>
>> Hi,
>>
>> Has there been any discussion on sending fixits from the server to client
>> as part of the 'publishDiagnostics' LSP response?
>> I would like to start working on an extension for this (disabled by
>> default), and would like to avoid duplicate work if there are already
>> people working on it :)
>>
>> Thanks,
>> Alex
>> _______________________________________________
>> clangd-dev mailing list
>> clangd-dev at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/clangd-dev
>>
>
>
> --
> Regards,
> Ilya Biryukov
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/clangd-dev/attachments/20180803/5ad4597b/attachment.html>


More information about the clangd-dev mailing list