mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 11:31:15 +00:00
fix: Be more permissive with completion resolve data
This commit is contained in:
parent
db55d9ade0
commit
8a9cacb22d
@ -1,5 +1,9 @@
|
|||||||
//! rust-analyzer extensions to the LSP.
|
//! rust-analyzer extensions to the LSP.
|
||||||
|
|
||||||
|
// Note when adding new resolve payloads, add a #[serde(default)] on boolean fields as some clients
|
||||||
|
// might strip `false` values from the JSON payload due to their reserialization logic turning false
|
||||||
|
// into null which will then cause them to be omitted in the resolve request. See https://github.com/rust-lang/rust-analyzer/issues/18767
|
||||||
|
|
||||||
#![allow(clippy::disallowed_types)]
|
#![allow(clippy::disallowed_types)]
|
||||||
|
|
||||||
use std::ops;
|
use std::ops;
|
||||||
@ -829,6 +833,7 @@ pub struct CompletionResolveData {
|
|||||||
pub version: Option<i32>,
|
pub version: Option<i32>,
|
||||||
#[serde(skip_serializing_if = "Option::is_none", default)]
|
#[serde(skip_serializing_if = "Option::is_none", default)]
|
||||||
pub trigger_character: Option<char>,
|
pub trigger_character: Option<char>,
|
||||||
|
#[serde(default)]
|
||||||
pub for_ref: bool,
|
pub for_ref: bool,
|
||||||
pub hash: String,
|
pub hash: String,
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!---
|
<!---
|
||||||
lsp/ext.rs hash: 512c06cd8b46a21d
|
lsp/ext.rs hash: 6dd762ae19630ec0
|
||||||
|
|
||||||
If you need to change the above hash to make the test pass, please check if you
|
If you need to change the above hash to make the test pass, please check if you
|
||||||
need to adjust this doc as well and ping this issue:
|
need to adjust this doc as well and ping this issue:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user