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

Running web-beautify-js when using react-layer causes snytax highlighting to be removed #5724

Closed
qnm opened this issue Apr 8, 2016 · 10 comments · May be fixed by yasuyk/web-beautify#29
Closed
Labels

Comments

@qnm
Copy link

qnm commented Apr 8, 2016

Description

When editing a JSX file in spacemacs, when I beautify the file (spc-m-=), the syntax highlighting for the file is removed.

Reproduction guide

  • Start Emacs
  • Open JSX-format file
  • Beautify file (spc-m-=)
  • File is beautified

Observed behaviour:
Syntax highlighting is no longer shown

Expected behaviour:
Syntax highlighting should be shown

System Info

  • OS: gnu/linux
  • Emacs: 24.5.1
  • Spacemacs: 0.105.16
  • Spacemacs branch: master (rev. cf8563b)
  • Graphic display: t
  • Distribution: spacemacs
  • Editing style: vim
  • Completion: helm
  • Layers:
(emacs-lisp react)

Backtrace

No backtrace.

@cpaulik
Copy link
Contributor

cpaulik commented Apr 8, 2016

I've seen the same in other modes that use web-beautify, namely .js and html. Saving the file brings back the highlighting for me.

@StreakyCobra
Copy link
Contributor

Can somebody try to reproduce on a stock emacs to see if it is a Spacemacs bug or an upstream issue? SPC q D can be used to restart in stock emacs with just some packages enabled.

@cpaulik
Copy link
Contributor

cpaulik commented Apr 8, 2016

I just tried again. It works in .js but not in .html also when starting with SPC q D and only loading evil and helm.

@qnm
Copy link
Author

qnm commented Apr 8, 2016

I can confirm that the behaviour is correct when I beautify a React component with .js extension.

@d12frosted
Copy link
Collaborator

Any updates with this issue? 😸

@BelfordZ
Copy link

confirmed issue

@zhewuzhou
Copy link

I have got the same issue, if you have pure js then everything is fine, but if you have jsx(including tags) then after web-beautify-js, syntax highlighting is gone

@aumana
Copy link

aumana commented Feb 9, 2017

I can confirm that I have the same issue for files with .jsx extension. I also tried with pure .js files in the same project and it doesn't happen.

@cyberxndr
Copy link
Contributor

Same issue, jsx formatting causes syntax highlight loss.

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!

@github-actions github-actions bot added the stale marked as a stale issue/pr (usually by a bot) label Feb 29, 2020
@qnm qnm closed this as completed May 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants