mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-18 08:10:11 +00:00
More general server config message for proc-macro-api
This commit is contained in:
parent
9e8e124269
commit
5761b50ed8
3 changed files with 15 additions and 7 deletions
|
@ -33,7 +33,7 @@ pub enum Request {
|
|||
/// Since [`VERSION_CHECK_VERSION`]
|
||||
ApiVersionCheck {},
|
||||
/// Since [`RUST_ANALYZER_SPAN_SUPPORT`]
|
||||
SetSpanMode(SpanMode),
|
||||
SetConfig(ServerConfig),
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Default, Debug, Serialize, Deserialize)]
|
||||
|
@ -52,11 +52,17 @@ pub enum Response {
|
|||
/// Since [`NO_VERSION_CHECK_VERSION`]
|
||||
ApiVersionCheck(u32),
|
||||
/// Since [`RUST_ANALYZER_SPAN_SUPPORT`]
|
||||
SetSpanMode(SpanMode),
|
||||
SetConfig(ServerConfig),
|
||||
/// Since [`RUST_ANALYZER_SPAN_SUPPORT`]
|
||||
ExpandMacroExtended(Result<ExpandMacroExtended, PanicMessage>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, Default)]
|
||||
#[serde(default)]
|
||||
pub struct ServerConfig {
|
||||
pub span_mode: SpanMode,
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
pub struct ExpandMacroExtended {
|
||||
pub tree: FlatTree,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue