-
Notifications
You must be signed in to change notification settings - Fork 74
Inlay Hint preferences for JS/TS #955
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
Inlay Hint preferences for JS/TS #955
Conversation
| # *******************************************************************************/ | ||
|
|
||
| # TypeScript Inlay Hints preference page | ||
| TypeScriptInlayHintPreferencePage_includeInlayEnumMemberValueHints=Enable/disable inlay hints for member values in enum declarations. |
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.
Please replace Enable/Disable with "Show".
Also please try to factorize the label "Show inlay hints for..."
so the checkbox items become only "member vaues in enum declaration", "implicity return ty[e on function signatures", and so on.
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.
e7f86f0 to
1bfc90b
Compare
| TypeScriptInlayHintPreferencePage_includeInlayParameterNameHints_all=For literal and non-literal arguments. | ||
| TypeScriptInlayHintPreferencePage_includeInlayParameterNameHintsWhenArgumentMatchesName=Show parameter name hints on arguments whose text is identical to the parameter name. | ||
| TypeScriptInlayHintPreferencePage_includeInlayVariableTypeHints=Show inlay hints for variable type. | ||
| TypeScriptInlayHintPreferencePage_includeInlayVariableTypeHintsWhenTypeMatchesName=Show variable type hints on variables whose name is identical to the type name. No newline at end of file |
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.
| TypeScriptInlayHintPreferencePage_includeInlayVariableTypeHintsWhenTypeMatchesName=Show variable type hints on variables whose name is identical to the type name. | |
| TypeScriptInlayHintPreferencePage_includeInlayVariableTypeHintsWhenTypeMatchesName=also variables whose name is identical to the type name. |
Ideally with an indent to show it refers to former checkbox.
| TypeScriptInlayHintPreferencePage_includeInlayParameterNameHints_literals=Only for literal arguments. | ||
| TypeScriptInlayHintPreferencePage_includeInlayParameterNameHints_all=For literal and non-literal arguments. | ||
| TypeScriptInlayHintPreferencePage_includeInlayParameterNameHintsWhenArgumentMatchesName=Show parameter name hints on arguments whose text is identical to the parameter name. | ||
| TypeScriptInlayHintPreferencePage_includeInlayVariableTypeHints=Show inlay hints for variable 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.
| TypeScriptInlayHintPreferencePage_includeInlayVariableTypeHints=Show inlay hints for variable type. | |
| TypeScriptInlayHintPreferencePage_includeInlayVariableTypeHints=Variable type |
| TypeScriptInlayHintPreferencePage_includeInlayFunctionLikeReturnTypeHints=implicit return types on function signatures. | ||
| TypeScriptInlayHintPreferencePage_includeInlayFunctionParameterTypeHints=function parameter type. | ||
| TypeScriptInlayHintPreferencePage_includeInlayPropertyDeclarationTypeHints=property declaration type. | ||
| TypeScriptInlayHintPreferencePage_includeInlayParameterNameHints=Show inlay hints for parameter names: |
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.
| TypeScriptInlayHintPreferencePage_includeInlayParameterNameHints=Show inlay hints for parameter names: | |
| TypeScriptInlayHintPreferencePage_includeInlayParameterNameHints=Parameter names: |
| TypeScriptInlayHintPreferencePage_includeInlayFunctionParameterTypeHints=function parameter type. | ||
| TypeScriptInlayHintPreferencePage_includeInlayPropertyDeclarationTypeHints=property declaration type. | ||
| TypeScriptInlayHintPreferencePage_includeInlayParameterNameHints=Show inlay hints for parameter names: | ||
| TypeScriptInlayHintPreferencePage_includeInlayParameterNameHints_none=Disable parameter name hints. |
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.
| TypeScriptInlayHintPreferencePage_includeInlayParameterNameHints_none=Disable parameter name hints. | |
| TypeScriptInlayHintPreferencePage_includeInlayParameterNameHints_none=Never |
| Messages.TypeScriptInlayHintPreferencePage_includeInlayParameterNameHintsWhenArgumentMatchesName, | ||
| parent)); | ||
|
|
||
| createSeparator(parent); |
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.
Please avoid separator. If you want to separate blocks, just add a vertical space, not a line.
| "literals" }, | ||
| { Messages.TypeScriptInlayHintPreferencePage_includeInlayParameterNameHints_all, "all" } }, | ||
| parent)); | ||
| addField(new BooleanFieldEditor( |
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.
can this be indented in the UI so it's clearer it refers to former option?
| createSeparator(parent); | ||
|
|
||
| addField(new BooleanFieldEditor(TYPESCRIPT_PREFERENCES_INLAY_HINTS_INCLUDE_INLAY_VARIABLE_TYPE_HINTS, | ||
| Messages.TypeScriptInlayHintPreferencePage_includeInlayVariableTypeHints, parent)); |
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.
can this be indented in the UI so it's clearer it refers to former option?
| Label separator = new Label(parent, SWT.HORIZONTAL | SWT.SEPARATOR); | ||
| GridData data = new GridData(GridData.FILL_HORIZONTAL); | ||
| data.horizontalSpan = 2; | ||
| separator.setLayoutData(data); |
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.
An empty label would be better (just a vertical space)
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 removed the label separator
|
I will fix your comment but for UI I will see if I can fix that quickly but it should be nice if other people could improve the UI because I would prefer spending my time to provide another ui préférences like format and my main goal is to improve platform to fix insert spaces préférences for xml js etc, the feature that more and more users expect and they have with wtp and jsdt |
1bfc90b to
cd46281
Compare
|
@mickaelistria I have managed indentation for checkbox andremove label separator. here the result: |
|
Thanks, this page looks much better! |


This PR provides Inlay Hint preferences for JS/TS
All inlay hint are disabled by default.
If you enable for instance parameter name, you should see
Please note that you need to update the content of the editor need to bechange to refresh inlay hint