Skip to content

Commit

Permalink
bugfix: Allow kebab case in inlay hints
Browse files Browse the repository at this point in the history
  • Loading branch information
tgodzik committed Nov 14, 2024
1 parent f7da3ce commit 2df881d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,14 @@ object InlayHintsOption {
case object ImplicitArguments extends InlayHintsOption
case object TypeParameters extends InlayHintsOption
case object HintsInPatternMatch extends InlayHintsOption
def unapply(value: String): Option[InlayHintsOption] = value match {
case "inferredTypes" => Some(InferredType)
case "implicitConversions" => Some(ImplicitConversions)
case "implicitArguments" => Some(ImplicitArguments)
case "typeParameters" => Some(TypeParameters)
case "hintsInPatternMatch" => Some(HintsInPatternMatch)
case _ => None
}
def unapply(value: String): Option[InlayHintsOption] =
StringCase.kebabToCamel(value) match {
case "inferredTypes" => Some(InferredType)
case "implicitConversions" => Some(ImplicitConversions)
case "implicitArguments" => Some(ImplicitArguments)
case "typeParameters" => Some(TypeParameters)
case "hintsInPatternMatch" => Some(HintsInPatternMatch)
case _ => None
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ class UserConfigurationSync(
case Left(errors) =>
errors.foreach { error => scribe.error(s"config error: $error") }
None
case Right(newUserConfig) => Some(newUserConfig)
case Right(newUserConfig) =>
scribe.debug("New user configuration: " + newUserConfig)
Some(newUserConfig)
}
}

0 comments on commit 2df881d

Please sign in to comment.