Skip to content
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

Attributes auto suggest, props inlay hints and better declare missing properties code action #208

Closed
tjx666 opened this issue Apr 27, 2024 · 8 comments
Assignees

Comments

@tjx666
Copy link

tjx666 commented Apr 27, 2024

You can check the extension https://github.com/xicunyang/ts-space-prompt, the feature of that extension is awesome. But it conflict with this extension, and the implementation of that extension seems not very good, it copy whole official ts plugin code. I recommend to migrate the feature of that extension to this extension.

image

Another similar feature request is inspire from volarjs, show required props hint:

image

I think you're very impressive, big bro, and also very passionate about VSCode extension development. If you have the time, consider integrating these features into this plugin.

@tjx666
Copy link
Author

tjx666 commented Apr 28, 2024

@zardoy @Ilanaya update description

@Ilanaya
Copy link
Collaborator

Ilanaya commented Apr 28, 2024

Thanks! I'll be able to work on your requests tomorrow

@zardoy
Copy link
Owner

zardoy commented May 1, 2024

Hey, sorry for the delayed response.

You can check the extension xicunyang/ts-space-prompt, the feature of that extension is awesome

What features from this extension do you think are awesome? Please be specific and I'll migrate them for you without any problems.

  • auto-trigger completions (trigger attribute completions on space, can also auto-trigger object suggestions on comma and so on)
  • fill in missing attributes or properties. There is already builtin "declare missing properties" code fix, we can just improve it by adding tab stops. @Ilanaya we might also consider migrating insertCompletions feature from experiments extension which is more powerful and useful

@tjx666 please let us know if that's what you need

Also, I don't think it would make sense to fix compatibility with the aforementioned extension.

@tjx666
Copy link
Author

tjx666 commented May 1, 2024

Yes, you understand my need very clear. What's more is that mising props inlay hints

@zardoy
Copy link
Owner

zardoy commented May 1, 2024

Yes, you understand my need very clear. What's more is that mising props inlay hints

Okay, + inlay hints of missing props for react components. I'll implement these 3 features within 3 next days, would be awesome if you could tell us how we can better present these features for better discoverability!

@zardoy zardoy changed the title migrate the feature Attributes auto suggest, props inlay hints and better declare missing properties code action May 1, 2024
zardoy added a commit that referenced this issue May 24, 2024
…, enable with `tsEssentialPlugins.inlayHints.missingJsxAttributes.enabled` #208
@zardoy
Copy link
Owner

zardoy commented May 24, 2024

Adding declare missing codefix that adds
image
image

can hide the original with

"tsEssentialPlugins.removeCodeFixes.codefixes": [
        "fixMissingFunctionDeclaration",
        "fixMissingAttributes"
]

or maybe I should do it by default


added inlay hints (disabled by default):
image


Added auto completion trigger for attributes (enabled by default)

@zardoy zardoy closed this as completed May 24, 2024
@tjx666
Copy link
Author

tjx666 commented May 25, 2024

@zardoy

we can just improve it by adding tab stops

seems doesn't work

@tjx666
Copy link
Author

tjx666 commented May 25, 2024

volar support double click the missing props to add it:

2024-05-25.21.01.53.mov

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants