-
Notifications
You must be signed in to change notification settings - Fork 333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: use enum with default value for modelling show inferred types #5502
Conversation
@@ -484,7 +489,15 @@ object UserConfiguration { | |||
val superMethodLensesEnabled = | |||
getBooleanKey("super-method-lenses-enabled").getOrElse(false) | |||
val showInferredType = | |||
getStringKey("show-inferred-type") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to use getBooleanKey
, it seems that getStringKey
was working even with boolean values?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought about for a while, if getStringKey
is working then we can leave it
def isNotDisabled: Boolean = !isDisabled | ||
} | ||
|
||
object ShowInferredType { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably ideal scenario would be a json config, but that is much harder to model in the UI. Something like git lenses would be great where we would have a separate webview with the settings and turning them on/off would show the results immediately on a sample code. I think we could do that later as a totally different setting and then deprecate these.
On the other hand, the boolean or enum settings are quite easy to toggle on/off, which might be more complex to do in the scenario I am suggesting. We could just keep toogle options that would enable/disable a subset of configuration 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we could do that later as a totally different setting and then deprecate these.
ok, sounds reasonable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also I think adding a settings page for those sounds like a great project for anyone who knows typescript a bit better 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, now as we're on the same page, I'm closing PR
quick prototype showing what I meant in scalameta/metals-vscode#1412 (comment)
Option
for this config? Does it make a difference to treat no value case as off?cc: @tgodzik