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

Please improve the auto-completion of DOM tags in React. #4271

Open
1 task done
path-of-reason opened this issue Jan 15, 2024 · 18 comments
Open
1 task done

Please improve the auto-completion of DOM tags in React. #4271

path-of-reason opened this issue Jan 15, 2024 · 18 comments
Labels
editor Feedback for code editing, formatting, editor iterations, etc enhancement [core label] javascript JavaScript programming language support language An umbrella label for all programming languages syntax behaviors typescript TypeScript programming language support

Comments

@path-of-reason
Copy link

Check for existing issues

  • Completed

Describe the feature

Currently, when I type "div" in a tsx or jsx file, there is no IntelliSense support.
Suggestions only work after I type the angle bracket '<', and I still have to close the tag manually, which is inconvenient.

If applicable, add mockups / screenshots to help present your vision of the feature

No response

@path-of-reason path-of-reason added admin read Pending admin review enhancement [core label] triage Maintainer needs to classify the issue labels Jan 15, 2024
@JosephTLyons JosephTLyons added editor Feedback for code editing, formatting, editor iterations, etc language An umbrella label for all programming languages syntax behaviors typescript TypeScript programming language support javascript JavaScript programming language support and removed triage Maintainer needs to classify the issue admin read Pending admin review labels Jan 15, 2024
@JosephTLyons JosephTLyons transferred this issue from zed-industries/community Jan 24, 2024
@emersonjds
Copy link

@path-of-reason This really helps a lot, rewriting tags all the time is tiring

@emersonjds
Copy link

@JosephTLyons This is a feature that brings a totally different experience to the developer, let's look more at the experience to build a cutting-edge product

@KoHorizon
Copy link

I agree, this is the only issue that stop me from using this IDE. Might implement it myself, if it's not the priority.

@chungweileong94
Copy link
Contributor

Coming from #5267, the tag auto-close doesn’t seem to work for HTML either.

@Moshyfawn
Copy link
Contributor

Moshyfawn commented May 30, 2024

Coming from #5267, the tag auto-close doesn’t seem to work for HTML either.

Which version of Zed are you on? Do you have the HTML extension installed?

@chungweileong94
Copy link
Contributor

Coming from #5267, the tag auto-close doesn’t seem to work for HTML either.

Which version of Zed are you on? Do you have the HTML extension installed?

I just tested on the latest preview 0.138.1, and the problem still persists. And I do have the HTML extension installed as well.

Screen.Recording.2024-05-30.at.1.06.01.PM.mov

@Moshyfawn
Copy link
Contributor

It's after you complete the tag with > that the LSP closes it for you.

@chungweileong94
Copy link
Contributor

It's after you complete the tag with > that the LSP closes it for you.

Ah, my bad, I'm actually showing the wrong demo here. But yeah, but yeah, it's working in the latest 0.138 now😅
But it wasn't the case for 0.137 before.

@IlirEdis
Copy link

IlirEdis commented Jun 5, 2024

This keeps me from switching to Zed! Also shortcuts for code snippets such as rsfc to create a React function component, etc... This makes your slogan obsolete ;)

@leognmotta
Copy link

leognmotta commented Jun 7, 2024

I don't know, there is always something basic that keeps me from switching to zed

@monarcode
Copy link

This and no snippets support are the main reason I have not switched to Zed fully

typing rfc and getting a react component scaffolded for you is way to good to pass up on

@osiewicz
Copy link
Contributor

For what it's worth, we've recently landed support for snippets in #13253

@monarcode
Copy link

@osiewicz Hi, i did see the update on snippet support and already tried it out, how ever, i noticed that the formatting is seemingly bugged.

when the snipper is expanded it does not appear as it should..see screenshots bellow
Monarch Twitter Media
Monarch Twitter Media (1)

@osiewicz
Copy link
Contributor

Do you mean that <p></p> is getting de-indented?

@monarcode
Copy link

Yes, that

@monarcode
Copy link

Any way to fix that? @osiewicz

@osiewicz
Copy link
Contributor

No, I'm sorry, I haven't looked into it yet. A wild guess is that formatting gets applied to completions automatically, which may not be desired for snippets. If so, we should add a way for a language server to opt out of automatic formatting

@tpolito
Copy link

tpolito commented Jul 14, 2024

Any movement on this? I'm on Zed 0.143.7, with the extension and tags aren't closing.

Screen.Recording.2024-07-14.at.12.24.50.PM.mov

@osiewicz osiewicz closed this as not planned Won't fix, can't repro, duplicate, stale Jul 15, 2024
@osiewicz osiewicz reopened this Jul 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editor Feedback for code editing, formatting, editor iterations, etc enhancement [core label] javascript JavaScript programming language support language An umbrella label for all programming languages syntax behaviors typescript TypeScript programming language support
Projects
None yet
Development

No branches or pull requests