LSP: vale (prose linter)

The handler isn’t the part that generates the diagnostics, but instead it is the function which is called if a language server sends diagnostics to the client.
You’d have to call the existing diagnostic handler with a fake lsp- client


 ┌───────────────────────┐                           ┌──────────┐
 │ lsp.handlers          │◄──────────────────────────│lsp server│
 │  on_publishDiagnostics│   (diagnostics result)    └──────────┘
 └───────────────────────┘      commnication via
                                nvim lsp client / rpc

There are already some options you can check out that allow you to use Vale via the vim.lsp.diagnostic interface

1 Like