lsp-types
lsp-types copied to clipboard
impl Default for types that contains deprecated fields
When I create lsp_types::document_symbols::DocumentSymbol, I always write an extra line #[allow(deprecated)] to suppress deprecated lint message.
These symbols also have no constructor.
I think we can implement Default for these types, then it can be used like this.
DocumentSymbol {
name: some_name,
detail: Some(detail),
..Default::default()
}
The only problem is that some fields are difficult to choose default values