IntelliJ Community Edition: Javascript syntax highlighting - javascript

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.

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).

The TextMate Bundles Support plug-in is not enough. You also need specific language bundles.
install and enabled the TextMate bundle support plugin in IntelliJ
Download the specific language bundles and unzip them somewhere where you find them, e.g., TypeScript, Shell Script TextMate Bundle
Open the Settings/Preferences dialog, got to Editor and select TextMate Bundles
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.
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

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.

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.

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.

Alternative I tried (but raised another issue):
Marked VS Code as default app to open .js files.
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.

Related

Eclipse Javascript syntax highlighting broken after update?

After the recent Eclipse update (Version 4.17.0, Build 20200910-1200) the syntax highlighting for Javascript files is not working any longer. Furthermore the *.js file association and the Textmate section are missing in the preferences.
Does anybody experience similar problems?

Eclipse 2020-06 Javascript - Syntax Hightlighting not working

after updating my Eclipse IDE to the actual 2020-06 version the syntax highlighting for JavaScript does not work any more.
Is this a known/common problem and how can I fix this?
After spending most of a day futzing with it, including installing a new instance of Eclipse PDT, I found that I could fix it simply by adding *.js to the File Associations preference page and setting its default to "Generic Text Editor".
Per the Eclipse Bugzilla Report:
Standalone JS Editor is not provided anymore.
To work with JavaScript/TypeScript projects users may install JS [1] or JEE [2] EPP packages, WildWebDeveloper [3] or other products.
[1] https://www.eclipse.org/downloads/packages/release/2020-06/r/eclipse-ide-web-and-javascript-developers
[2] https://www.eclipse.org/downloads/packages/release/2020-06/r/eclipse-ide-enterprise-java-developers
[3] https://marketplace.eclipse.org/content/eclipse-wild-web-developer-html-css-javascript-typescript-nodejs-angular-json-yaml
Basically this means that the Eclipse JavaScript Development Tools (JSDT) is no longer supported.
It could just be me, but [1] seems to be a pretty stripped-down version of Eclipse. It doesn't even include Package Explorer, which baffles me. [2] is a bit better in my opinion, at least having Package Explorer. (I do love Package Explorer ๐Ÿ˜œ) However, I'm not really interested in installing a new version of Eclipse when the way [1] and [2] implement JavaScript support is through [3] Wild Web Developer ("WWD") anyway. (You don't have to follow that link for [3]; you can find it in the Eclipse Marketplace just fine. Also, you'll have to reopen any JavaScript files you have open for the update to work.)
I added WWD through the Eclipse Marketplace on my Windows x64 version of Eclipse IDE for Java Developers, 2020-06. I guess it works, but it sure doesn't integrate like JSDT did.
I'm not thrilled with WWD since the first thing I tried to do is comment a line in JavaScript using Ctrl+/ and it summons a dropdown of keyword and available function choices. Ctrl+. does the same thing, and feels more appropriate, so what's the deal? ๐Ÿคจ Want to change the keyboard shortcuts? Too bad. There's nothing under the Keys preference that has anything to do with TextMate/WWD actions.
Want to change the syntax coloring? Better love what you're given. There is no Syntax Coloring section or anything like it. There's a TextMate set of preferences, but it seems like anything regarding Theme doesn't actually work. Is it because I use DevStyle and the Darkest Dark theme? Who knows.
There's only one WWD preference (XML), which does nothing but tell you "See 'XML Catalogs' for XML catalogs preferences". Thanks? It's also version 0.10.0.etc, which feels like we're being forced to test it. Overall I'm pretty disappointed, especially since Eclipse just automatically upgraded itself from 2020-03 to 2020-06 and now I'm stuck with this. Boo to you on this move, Eclipse ๐Ÿ˜ž
This is how I fixed it:
Install "Eclipse web developer tools 3.20" from Eclipse marketplace
Restart
Open a JS file. Right-click on line number > Switch to theme > Eclipse light.
Done.

Eclipse Neon Content Assist has no proposals for JavaScript

Bottom Line Up Front: Eclipse Neon content assist (Ctrl+space) does not offer any proposals for my JavaScript code.
Here is what I've checked so far:
JSDT has been installed
"JavaScript resources" include ECMASciptBuilt-In Library, ECMA 3 Browser Support Library, jQuery
The project's Include path has ECMAScipt Built-In Library, ECMA 3 Browser Support Library, jQuery, and JavaScript Web Project support
Eclipse's JavaScript Content Assist is enabled and includes Basic proposals, Other JavaScript Proposals, Template Proposals, and word proposals.
I changed the content assist from ctrl+space to ctrl+0 to check whether ctrl+space had been hijacked
Content assist DOES work with regular Java (in a different project)
I tried reset to defaults under Content Assist > Advanced
JavaScript facet is selected for the project
.js files and .jsp files are stored in folders that are under folders that are designated as source folders in the project properties under JavaScript > Include Path
This is also an issue in Mars 2.
I've run through the steps listed here for configuring content assist: http://www.eclipse.org/pdt/help/html/using_javascript_content_assist.htm
The content assist isn't even proposing functions that are defined within the same .js file. How can I get Eclipse's content assist to propose elements correctly?
I have the same problem and it seems to be a known bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=504057
+1 not working in Eclipse Neon. As an alternative you may try Netbeans 8. Javascript is working good there. I don't know what happened to Eclipse but php and Js support is poor.
P.S. Just downloaded Eclipse Mars - can confirm that it's working fine.
I've met this situation before,and then I found that if the js file is in a "normal java project",then it won't come uip with content assist,but if the js file is in a "dynamic web project",then the content assist just work well,hope it will help.

Javascript and VS2012 Intellisense

I am new to Visual Studio 2012 and Javscript coding. I have two questions i could not find answers on the web:
i have a webforms project and added some js-files to the sript-folder (http://raphaeljs.com/). Now i want to have Intellisense support for that js-library i added. Is that possible?
for what is the "_references.js" file in the scripts folder? I added all the js-library files to that file but it doesn't enable intellisense.
regards
I'm not sure about Visual Studio 2012, but in 2010, if you drag one JavaScript file onto another one it will add a /// <reference name="MyScript.js" /> line at the top of the second file. If the file being referenced is documented you will get quite useful intellisense, though it is still handy even if not for just being able to explore the surface of the API.
There is some good information in this question: IntelliSense for Ajax and JavaScript libraries in Visual Studio
To put it short, Visual Studio is terrible at intelli-sense for javascript. It is still light years behind other IDEs like IntelliJ & WebStorm.
A work around to slap it in line would be to use ReSharper which is a plugin but you need to pay for the license :(
Hope that helps.

Eclipse PDT - Javascript Code Assist is not work?

I thought PDT would do code assisting on JS files. Was I wrong, or is there a bug or something I am missing?
Is the Javascript development tools installed? I'm not sure, whether its installed together with the PHP Development Tools.
Select Help/Install new software, then select the Helios update site (http://download.eclipse.org/releases/helios), then install the Javascript Development Tools from the Web, XML and Java EE category.
Update: See the answer at your other question.
Got here because I had the same problem, first install "Eclipse web developer tools => javascript development tools"
Then instead of creating a javascript project create a "static web project". Right click the project in project explorer choose configure (in the bottom) make sure you add javascript support (if it's not there than it's probably already supported).
Under your project in project explorer there should be an item called javascript resources right click that and choose properties. If the browser libraries or ecma3 libraries are not there you can add them.

Categories