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

Generic JSX transform completion #919

Merged
merged 7 commits into from
Feb 11, 2024
Merged

Conversation

zth
Copy link
Collaborator

@zth zth commented Feb 7, 2024

This adapts the JSX lowercase element completion (both for the attribute names and values) to look up the proper type if using a generic JSX transform, instead of relying on hard coded paths to React and ReactDOM.

I set up a new test project for this because that felt the least invasive compared to changing the main test project's JSX config.

Closes #914

@zth zth requested a review from cristianoc February 7, 2024 20:16
.gitignore Outdated
@@ -7,6 +7,10 @@ analysis/tests/lib
analysis/tests/.bsb.lock
analysis/tests/.merlin

analysis/tests-generic-jsx-transform/lib
analysis/tests-generic-jsx-transform/.bsb.lock
analysis/tests-generic-jsx-transform/.merlin
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think .merlin files are not generated anymore.

@zth zth force-pushed the generic-jsx-transform-completion branch from 99d6b61 to 580ac3c Compare February 10, 2024 20:32
@zth zth force-pushed the generic-jsx-transform-completion branch from be35114 to 8f7346f Compare February 11, 2024 19:40
@zth zth merged commit 5b39b09 into master Feb 11, 2024
5 checks passed
@zth zth deleted the generic-jsx-transform-completion branch February 11, 2024 19:52
aspeddro pushed a commit to aspeddro/rescript-vscode that referenced this pull request Mar 4, 2024
* add test project for generic JSX transform

* adapt completion to look up the correct types when using a generic JSX transform

* changelog

* adapt the primitive completions inside of jsx to the generic JSX moe

* remove uneccessary ignore

* update

* update
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

Successfully merging this pull request may close these issues.

Support completion for generic JSX transform
2 participants