diff options
Diffstat (limited to 'crates/rust-analyzer/src/lsp_ext.rs')
-rw-r--r-- | crates/rust-analyzer/src/lsp_ext.rs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/crates/rust-analyzer/src/lsp_ext.rs b/crates/rust-analyzer/src/lsp_ext.rs index efcdcd1d9..0e1fec209 100644 --- a/crates/rust-analyzer/src/lsp_ext.rs +++ b/crates/rust-analyzer/src/lsp_ext.rs | |||
@@ -402,3 +402,25 @@ pub(crate) enum CodeLensResolveData { | |||
402 | pub fn supports_utf8(caps: &lsp_types::ClientCapabilities) -> bool { | 402 | pub fn supports_utf8(caps: &lsp_types::ClientCapabilities) -> bool { |
403 | caps.offset_encoding.as_deref().unwrap_or_default().iter().any(|it| it == "utf-8") | 403 | caps.offset_encoding.as_deref().unwrap_or_default().iter().any(|it| it == "utf-8") |
404 | } | 404 | } |
405 | |||
406 | pub enum MoveItem {} | ||
407 | |||
408 | impl Request for MoveItem { | ||
409 | type Params = MoveItemParams; | ||
410 | type Result = Option<lsp_types::TextDocumentEdit>; | ||
411 | const METHOD: &'static str = "experimental/moveItem"; | ||
412 | } | ||
413 | |||
414 | #[derive(Serialize, Deserialize, Debug)] | ||
415 | #[serde(rename_all = "camelCase")] | ||
416 | pub struct MoveItemParams { | ||
417 | pub direction: MoveItemDirection, | ||
418 | pub text_document: TextDocumentIdentifier, | ||
419 | pub range: Range, | ||
420 | } | ||
421 | |||
422 | #[derive(Serialize, Deserialize, Debug)] | ||
423 | pub enum MoveItemDirection { | ||
424 | Up, | ||
425 | Down, | ||
426 | } | ||