More maintainable caps config

The idea here is that we preserve client's config as is, without
changes. This gets rid of state!
This commit is contained in:
Aleksey Kladov
2021-01-05 16:57:05 +03:00
parent c8d3d5694b
commit 624eb1ee54
6 changed files with 124 additions and 83 deletions

View File

@@ -79,7 +79,7 @@ impl GlobalState {
}
pub(crate) fn transition(&mut self, new_status: Status) {
self.status = new_status;
if self.config.client_caps.status_notification {
if self.config.status_notification() {
let lsp_status = match new_status {
Status::Loading => lsp_ext::Status::Loading,
Status::Ready => lsp_ext::Status::Ready,