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

Improve JSDoc injection in comments #10800

Merged
merged 3 commits into from May 3, 2024

Conversation

olrtg
Copy link
Contributor

@olrtg olrtg commented Apr 20, 2024

This PR improves JSDoc injection for syntax highlighting. Now we are only injecting JSDoc in block comments. The regex was mostly adapted from nvim-treesitter's implementation (lua) to a rust regex.

https://github.com/nvim-treesitter/nvim-treesitter/blob/eb93c3b2fbe9ca55d70e9297d5c037880b997559/queries/ecma/injections.scm#L1-L6

Before:
Screenshot 2024-04-20 at 5 51 04 AM

After:
Screenshot 2024-04-20 at 5 52 05 AM

Release Notes:

Copy link

cla-bot bot commented Apr 20, 2024

We require contributors to sign our Contributor License Agreement, and we don't have @olrtg on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

@olrtg
Copy link
Contributor Author

olrtg commented Apr 20, 2024

@cla-bot check

Copy link

cla-bot bot commented Apr 20, 2024

We require contributors to sign our Contributor License Agreement, and we don't have @olrtg on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

Copy link

cla-bot bot commented Apr 20, 2024

The cla-bot has been summoned, and re-checked this pull request!

@olrtg
Copy link
Contributor Author

olrtg commented Apr 20, 2024

@cla-bot check

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Apr 20, 2024
Copy link

cla-bot bot commented Apr 20, 2024

The cla-bot has been summoned, and re-checked this pull request!

@mrnugget mrnugget merged commit f987ff0 into zed-industries:main May 3, 2024
9 checks passed
@olrtg olrtg deleted the improved-jsdoc-injection branch May 3, 2024 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed The user has signed the Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants