pub trait TypeProvider: 'static {
type Command: Command;
type CodeLensData: Serialize + DeserializeOwned;
type CompletionData: Serialize + DeserializeOwned + Debug;
type Configuration: DeserializeOwned;
type InitializeOptions: DeserializeOwned;
type ShowMessageRequestData: Serialize + DeserializeOwned + Default;
type ApplyEditData: Serialize + DeserializeOwned + Default;
}Expand description
This trait is used to set type definitions for requests and notifications with dynamic parameters.
For simplicity, it is recommended to use the
type_provider macro instead of implementing the default values manually.
Even tough technically allowed by the spec, it is not recommended to use
() as default types as some lsp clients may return undefined instead of null
in their responses causing the a deserialisation error on the server.