29

I'm using IntelliJ IDEA 12 Community Edition, and am trying to set the syntax coloring for Javascript files. When I choose File > Settings > IDE Settings > Editor > Colors & Fonts, Javascript is not an option in the list. Is this a limitation of the Community Edition IDE, or am I missing something? The others I need are listed, like Java and HTML, but Javascript is missing from the list.

Thanks.

2

8 Answers 8

21

JavaScript support is supported in Ultimate Edition, but not in Community Edition.

For the basic syntax highlighting you can try the TextMate Bundles Support plug-in. See this document for the setup instructions (it's for PhpStorm, but instructions for IntelliJ IDEA would be the same).

Sign up to request clarification or add additional context in comments.

1 Comment

TextMate Bundles plugin is bundled in modern IDEA versions but to enable it's JavaScript syntax highlighting an extra setup is required. See stackoverflow.com/a/76053392/9137155
10

The TextMate Bundles Support plug-in is not enough. You also need specific language bundles.

  1. install and enabled the TextMate bundle support plugin in IntelliJ
  2. Download the specific language bundles and unzip them somewhere where you find them, e.g., TypeScript, Shell Script TextMate Bundle
  3. Open the Settings/Preferences dialog, got to Editor and select TextMate Bundles
  4. Click on the + on the right side and choose the desired bundle from 2. on your hard disk. Then it should appear in the list of recognized bundles.
  5. Extension conflicts might appear: Click on "Show details". If you want to use the new syntax highlighting click on "unregister native file type".

A detailed explanation with screenshots can be found here

Comments

7

2023 answer

TextMate Bundles plugin is built-in in modern ItelliJ IDEA versions and it has JavaScript bundle built-in but to make it work you have to remove JavaScript (syntax highlighting only) from Recognized File Types:

  • Go to Settings > Editor > File Types > JavaScript (syntax highlighting only)
  • Remove *.js from File name patterns

Settings > Editor > File Types > JavaScript (syntax highlighting only)

Before: Default JavaScript highlighting in IntelliJ Community Edition

After: TextMate JavaScript highlighting in IntelliJ Community Edition

1 Comment

For TypeScript, remove .ts from "Text" file type.
3

I found this question after searching by "how to enable JS syntax highlight into JSP files" in my Intellij Community Edition.

Following the suggestion to use TextMate Bundles, I checked that it's already installed by default, including JSP support (built-in). But it did not work.

So, I fixed it by just removing the "*.jsp" pattern from "File Types > JSP", and after that now my IDE is using TextMate syntax highlight properly.

Comments

3

There is WebCalm plugin that adds JavaScript support: syntax highlighting, completion and other features. It's free and open-source.

Disclaimer: I'm the developer.

1 Comment

This plugin works great for me. I finally have JS syntax highlighting. A small issue was that my IDE froze while it was indexing my project after installing this plugin but now it seems to work okay. Thanks!
0

Use Visual Studio Code for Javascript support when using IntelliJ Community Edition. It's free and has all the support you would get for the paid version of IntelliJ Ultimate.

2 Comments

The formatting is attrocious though in VS code. IntelliJ is so good, it almost becomes a standard.
what the heck is this answer?
-1

Alternative I tried (but raised another issue):

  1. Marked VS Code as default app to open .js files.
  2. For IntelliJ, follow this: to configure .js files should be opened using VS Code

This has enabled to opening .js files into VS code when we command from IntelliJ Idea, but strangely, .js got disappeared from "Find in files" search list.

Inputs are welcomed, whether I had configured it wrong.

Comments

-2

Or buy it for $149 (personal ultimate edition). I've been buying it since 2013 and find it far superior to XCode. This is just my personal opinion though. Download a trial and see how you like it!

Pricing: https://www.jetbrains.com/idea/buy/#personal?billing=yearly

Trial: https://www.jetbrains.com/idea/download/

ps: I'm not endorsed or affiliated with Jetbrains. Just a fan.

1 Comment

I don't think that this answers OP's question and also was kinda unsolicited.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.