danr / kakoune-languageclient

WIP: Language server protocol client for the Kakoune text editor
MIT License
9 stars 0 forks source link

[WIP] publishDiagnostics implementation #11

Open Franciman opened 6 years ago

Franciman commented 6 years ago

Hi, there is just the minimum to show flags and messages, when the server sends a publishDiagnostics notification. We need to sync the document more often, probably on {Normal,Insert}Idle ?

Regarding lps-next/prev-diagnostics: I implemented them as a kak script because it seemed easier to copy the already done job, but would you prefer to implement it on typescript side? In this case we would also need to keep in memory the diagnostics for each buffer.

Finally, I created a separate lsp_diagnostics_helpers.kak file whose content is read at startup and executed by kakoune. I think it's a bit ugly as it is right now, but it became really hard to keep up with escapes and expansions and I couldn't just use the `` string because there is \1 in a sed command which gave problems and parts of shell scripts with ${stuff} which would have been expanded, too.

danr commented 6 years ago

Thanks for preparing this. However, this is not really the direction I want this project to go. The goal is to not have to write shell scripts but instead do the bulk of the work in a rich and typed language.