GraphQL indentation and syntax highlighting in emacs web-mode?

Viewed 430

I'm struggling to use emacs for React development, and I just can't get Graphql syntax highlighting and indentation to work in web-mode.

I know there's graphql-mode, but it's a major mode and it replaces the web-mode. So if I activate it, graphql highlighting works, but jsx and the rest stop working.

Can someone please help me to figure out how to make both jsx and graphql syntax/indentation work in emacs? Maybe share your config?

1 Answers

This doesn't answer the question exactly but might help.

While I don't personally use emacs (I use Sublime Text) and this may or may not help but I can thoroughly recommend rainbow brackets in dealing with the syntax for GraphQL and React plus other bracket heavy languages.

Seems like you can find out more here:
EmacsWiki page, and the mode itself is at rainbow-delimiters.el.

Related