diff options
Diffstat (limited to 'crates/rust-analyzer/src/to_proto.rs')
-rw-r--r-- | crates/rust-analyzer/src/to_proto.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/rust-analyzer/src/to_proto.rs b/crates/rust-analyzer/src/to_proto.rs index 1a8cdadad..5736875d3 100644 --- a/crates/rust-analyzer/src/to_proto.rs +++ b/crates/rust-analyzer/src/to_proto.rs | |||
@@ -484,7 +484,8 @@ pub(crate) fn folding_range( | |||
484 | let kind = match fold.kind { | 484 | let kind = match fold.kind { |
485 | FoldKind::Comment => Some(lsp_types::FoldingRangeKind::Comment), | 485 | FoldKind::Comment => Some(lsp_types::FoldingRangeKind::Comment), |
486 | FoldKind::Imports => Some(lsp_types::FoldingRangeKind::Imports), | 486 | FoldKind::Imports => Some(lsp_types::FoldingRangeKind::Imports), |
487 | FoldKind::Mods | FoldKind::Block | FoldKind::ArgList | FoldKind::Region => None, | 487 | FoldKind::Region => Some(lsp_types::FoldingRangeKind::Region), |
488 | FoldKind::Mods | FoldKind::Block | FoldKind::ArgList => None, | ||
488 | }; | 489 | }; |
489 | 490 | ||
490 | let range = range(line_index, fold.range); | 491 | let range = range(line_index, fold.range); |
@@ -838,11 +839,10 @@ pub(crate) fn resolved_code_action( | |||
838 | 839 | ||
839 | pub(crate) fn runnable( | 840 | pub(crate) fn runnable( |
840 | snap: &GlobalStateSnapshot, | 841 | snap: &GlobalStateSnapshot, |
841 | file_id: FileId, | ||
842 | runnable: Runnable, | 842 | runnable: Runnable, |
843 | ) -> Result<lsp_ext::Runnable> { | 843 | ) -> Result<lsp_ext::Runnable> { |
844 | let config = snap.config.runnables(); | 844 | let config = snap.config.runnables(); |
845 | let spec = CargoTargetSpec::for_file(snap, file_id)?; | 845 | let spec = CargoTargetSpec::for_file(snap, runnable.nav.file_id)?; |
846 | let workspace_root = spec.as_ref().map(|it| it.workspace_root.clone()); | 846 | let workspace_root = spec.as_ref().map(|it| it.workspace_root.clone()); |
847 | let target = spec.as_ref().map(|s| s.target.clone()); | 847 | let target = spec.as_ref().map(|s| s.target.clone()); |
848 | let (cargo_args, executable_args) = | 848 | let (cargo_args, executable_args) = |
@@ -875,7 +875,7 @@ pub(crate) fn code_lens( | |||
875 | let annotation_range = range(&line_index, annotation.range); | 875 | let annotation_range = range(&line_index, annotation.range); |
876 | 876 | ||
877 | let action = run.action(); | 877 | let action = run.action(); |
878 | let r = runnable(&snap, run.nav.file_id, run)?; | 878 | let r = runnable(&snap, run)?; |
879 | 879 | ||
880 | let command = if debug { | 880 | let command = if debug { |
881 | command::debug_single(&r) | 881 | command::debug_single(&r) |