message: Move find_definition_in_scope out of the find_definition function
  Summary: This function is not inherently bound to find_definition, and moving it up makes it more readable / reusable. Also did some cleanup to reduce indentation for readability.
diff: @@ -113,17 +113,24 @@ impl LspModule {
  // lookup, especially in cases where a file has not been changed, so the
  // LSPModule doesn't need to reparse anything.
  - // Look at the given scope and child scopes to try to find the definition of the symbol
  - // accessed at Pos.
  - fn find_definition_in_scope<'a>(
  - scope: &'a Scope,
  - pos: Pos,
  - ) -> TempIdentifierDefinition<'a> {
  + let scope = scope(&self.ast);
  + let line_span = self.ast.codemap.line_span(line as usize);
  + let current_pos = std::cmp::min(line_span.begin() + col, line_span.end());
  +
  + // Finalize the results after recursing down from and back up to the the top level scope.
  + self.get_definition_location(
  + Self::find_definition_in_scope(&scope, current_pos),
  + &scope,
  + current_pos,
  + )
  + }
  +
  + /// Look at the given scope and child scopes to try to find where the identifier
  + /// accessed at Pos is defined.
  + fn find_definition_in_scope<'a>(scope: &'a Scope, pos: Pos) -> TempIdentifierDefinition<'a> {
  for bind in &scope.inner {
  match bind {
  - Bind::Set(_, _) => {}
  - Bind::Get(g) => {
  - if g.span.contains(pos) {
  + Bind::Get(g) if g.span.contains(pos) => {
  let res = match scope.bound.get(g.node.as_str()) {
  Some((Assigner::Load { path, name }, span)) => {
  TempIdentifierDefinition::LoadedLocation {
  @@ -146,9 +153,8 @@ impl LspModule {
  };
  return res;
  }
  - }
  - Bind::Flow => {}
  - Bind::Scope(inner_scope) => match find_definition_in_scope(inner_scope, pos) {
  + Bind::Scope(inner_scope) => {
  + match Self::find_definition_in_scope(inner_scope, pos) {
  x @ TempIdentifierDefinition::Location { .. }
  | x @ TempIdentifierDefinition::LoadedLocation { .. } => {
  return x;
  @@ -171,22 +177,14 @@ impl LspModule {
  };
  }
  TempIdentifierDefinition::NotFound => {}
  - },
  }
  }
  - TempIdentifierDefinition::NotFound
  + // For everything else, just ignore it. Note that the `Get` is ignored
  + // because we already checked the pos above.
  + Bind::Set(_, _) | Bind::Flow | Bind::Get(_) => {}
  }
  -
  - let scope = scope(&self.ast);
  - let line_span = self.ast.codemap.line_span(line as usize);
  - let current_pos = std::cmp::min(line_span.begin() + col, line_span.end());
  -
  - // Finalize the results after recursing down from and back up to the the top level scope.
  - self.get_definition_location(
  - find_definition_in_scope(&scope, current_pos),
  - &scope,
  - current_pos,
  - )
  + }
  + TempIdentifierDefinition::NotFound
  }
  /// Converts a `TempIdentifierDefinition` to an `IdentifierDefinition`, resolving spans
  