Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make sure to refresh diagnostic UI on InsertLeave
In case the current filetype language server uses LSP async diagnostics, we might not get a reparse on InsertLeave. This happens if the user leaves insert mode after a semantic trigger. We would still try sending a FileReadyToParse request, but the diags get ignored, because: a) The filetype is known to use async diags. b) We do not insist on a synchronous diag update, like :YcmDiags. The solution is to check if the current filetype uses async diagnostics and, if so, let InsertLeave refresh diagnostic UI regardless of what the state of FileReadyToParse request is. Note that this solution makes the flicker on leaving insert mode harder to fix. Not only does OnCursorMoved cause a refresh of stale diagnostics, but so does OnInsertLeave.
- Loading branch information