pub enum LspQueryRecord<'a> {
Location {
flags: u8,
hash: LspHash,
line: u32,
col: u32,
end_line: u32,
end_col: u32,
path: &'a str,
},
Markup {
format: u8,
text: &'a str,
},
Symbol {
sym_kind: u8,
flags: u8,
depth: u8,
line: u32,
col: u32,
end_line: u32,
end_col: u32,
name: &'a str,
path: &'a str,
},
Edit {
flags: u8,
hash: LspHash,
line: u32,
col: u32,
end_line: u32,
end_col: u32,
new_text: &'a str,
path: &'a str,
},
Completion {
item_kind: u8,
flags: u8,
line: u32,
col: u32,
end_line: u32,
end_col: u32,
label: &'a str,
insert: &'a str,
detail: &'a str,
},
Signature {
flags: u8,
active_param: u16,
param_start: u16,
param_end: u16,
label: &'a str,
doc: &'a str,
},
}Expand description
One decoded record from an LSP_QUERY response payload.
Variants§
Location
LOCATION 0x01: [kind:1][flags:1][hash:16][line:4][col:4][end_line:4][end_col:4][path_len:2][path:N]
Fields
Markup
MARKUP 0x02: [kind:1][format:1][text_len:4][text:N]
Symbol
SYMBOL 0x03: [kind:1][sym_kind:1][flags:1][depth:1][line:4][col:4]
[end_line:4][end_col:4][name_len:2][name:N][path_len:2][path:N]
depth nests document outlines (pre-order); 0 at the top level.
Edit
EDIT 0x04: [kind:1][flags:1][hash:16][line:4][col:4][end_line:4][end_col:4]
[new_len:4][new_text:N][path_len:2][path:N]
One ordered edit of a rename plan, against the content version
named by hash. Data, never applied.
Fields
Completion
COMPLETION 0x05: [kind:1][item_kind:1][flags:1][line:4][col:4]
[end_line:4][end_col:4][label_len:2][label:N][insert_len:2][insert:N]
[detail_len:2][detail:N]
The range is the item’s primary replace range (zero range → the
client picks its own word boundary); empty insert → insert the
label.
Fields
Signature
SIGNATURE 0x06: [kind:1][flags:1][active_param:2][param_start:2]
[param_end:2][label_len:2][label:N][doc_len:4][doc:N]
One signature, the active one first (LSP_SIGNATURE_ACTIVE);
param_start/param_end bound the active parameter within
label in UTF-8 bytes (0,0 = unknown).
Trait Implementations§
Source§impl<'a> Clone for LspQueryRecord<'a>
impl<'a> Clone for LspQueryRecord<'a>
Source§fn clone(&self) -> LspQueryRecord<'a>
fn clone(&self) -> LspQueryRecord<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more