Utilize LSP completion itemDefaults a bit

Tailwind likes to throw a lot of completion data at us, this gets it to
send less. Previously it would respond to a completion with 2.5 MB JSON
blob, now it is more like 0.8 MB.

Relies on a local copy of lsp-types with the `itemDefaults` field added.
I don't have write perms to push to our fork of the crate atm, sorry :)
This commit is contained in:
Julia 2023-08-17 21:57:39 -04:00
parent 4f0fa21c04
commit a979e32127
4 changed files with 62 additions and 21 deletions

View file

@ -423,6 +423,14 @@ impl LanguageServer {
}),
..Default::default()
}),
completion_list: Some(CompletionListCapability {
item_defaults: Some(vec![
"commitCharacters".to_owned(),
"editRange".to_owned(),
"insertTextMode".to_owned(),
"data".to_owned(),
]),
}),
..Default::default()
}),
rename: Some(RenameClientCapabilities {