-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Use rjsx-mode for react framework #10627
Conversation
Since we use this method to enable |
As for the failed test, I'm not sure if we need to change the second to the third. It seems like
|
I am curious why you removed company-tern... does completion still work with your changes? |
My bad. I totally moved to lsp now and I forget to put company-tern back. I am going to fix this and open a new PR for lsp.😂 |
Just added |
lsp support can be tested through this PR |
Any thoughts on this PR. From my perspective, I prefer to put |
I think it is probably worth using. are you aware of anything that |
Not really. I used to use the
|
Another choice is to put |
Yes, it could be put under the javascript layer 👍
Ting Zhou <notifications@github.com> writes:
… Another choice is to put `rjsx` just under `javascript` layer since it's a single package added for JSX file editing.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#10627 (comment)
|
I tested this pr out and the layer does not have lsp support when in rjsx mode. tested by calling |
Actually let's keep it in `+frameworks/react` for now.
We'll see later if another pattern emerges, for now `react` seems the
natural way to go.
Sylvain Benner <notifications@github.com> writes
… Yes, it could be put under the javascript layer 👍
Ting Zhou ***@***.***> writes:
> Another choice is to put `rjsx` just under `javascript` layer since it's a single package added for JSX file editing.
>
> --
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly or view it on GitHub:
> #10627 (comment)
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#10627 (comment)
|
@fiveNinePlusR did you specify the javascript-backend under javascript layer? |
@ztlevi indeed i did and it definitely works under the js2-mode |
@fiveNinePlusR It should be good to test now. Anyone who familiar with flow-type javascript is welcome to test since I'm not really using it.
|
It does work now and the highlighting is working correctly now. i'd say this is good to merge. would be a good idea to implement the extra bindings that this pr will introduce though: #10486 ... probably best to wait until that's merged before introducing it to this layer. |
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.
LGTM
didn't try this PR yet, how does it behave with indentation? In general I'm currently trying out mixing webmode and rjsx-mode (waiting for felipeochoa/rjsx-mode#66), maybe is something that can be tried out here as well. It still feel a bit buggy:
Let me know what's the state in these regards and if could benefit to use rjsx as a minor mode, in general I would also be more than happy to move to a more js specific layer as web-mode is working great on the parsing/indenting side but still feel a bit of a hack and lot of IDE features are not available without rjsx minor mode |
@axyz I don't have any problem with Here are the experiences I have with
I disabled Mixing |
cool then, I think we can give it a try and eventually iterate over it. Ideally in the future everything could be included under js layer in order to also have a single place that could enable prettier/eslint/flow/etc... using autodiscovery |
also, typing the tagname and pressing tab will expand it to the full double enclosing tag. |
One thing that I would like is better lsp completion from the associated imported node modules. is that possible currently or on the roadmap? |
Thank you ! 👍 I extracted both Cherry-picked and squashed into develop branch, you can safely delete your branch. |
Since
rjsx-mode
is generally considered better mode for react editing, I put the PR to replace the react-mode withrjsx-mode
.rjsx-mode
will also be enabled for files with =react= imported by usingmagic-mode-alist
.