IntelliJ Ctrl-Click on method and autocompletion in HTML doesn't work - intellij-idea

I've started using IntelliJ for angular2 development recently but there seem to be a bug. I know from WebStorm that if I have following html:
<button (click)="onHaveClicked()">Button</button>
I should be able to jump to the method implementation in my typescript file using ctrl-click. But this shortcut isn't working at all. I've tried multiple different files.
Also autocompletion in html doesnt work at all. It's showing no angular attributes like ngFor etc. Angular2 is of course installed.
Was somebody with the same problem able to solve it?

IntelliJ doesn't come with Angular support built in. You can however enable it by installing the plugin. Settings -> Plugins -> Install Jetbrains Plugin -> Search for Angular.
This is a general thing with IntelliJ and the other editors. The specialized editors (like PhpStorm and WebStorm) comes with what you need for that editor by default. IntelliJ, which is more general, it often has to be installed manually.

Related

Can .mdx files be viewed in a non-javascript environment?

I do not use javascript in my current development setup and would [admittedly lazily..] like to avoid adding it to my dev stack. Is there a standalone viewer for .mdx files either in an IDE or maybe as an npm module? I did try:
Intellij : syntax highlighting only
Visual Studio Code : syntax highlighting only - though the docs of one of the plugins does claim the ability to display the javascript as well
Here is the info on the VsCode plugin. It does do the syntax highlighting but there is no preview pane for some reason

Syntax highlighting for scala.html and routes files in IntelliJ / Play framework

I am new to both IntelliJ and the Play framework. I noticed that after installing IntelliJ and importing my first Play application, syntax highlighting is not working properly for both *.scala.html files and the routes files. I was able to modify the settings for the *.scala.html files to have them recognized as Scala files, but this isn't actually correct because the scala templating system is not pure Scala.
Here's a screenshot, in case it helps:
In the official Play video tutorials there seems to be a special syntax highlighting setting for these template files, but I don't know how to add this to IntelliJ. Here's a screenshot from this tutorial and how I would like the syntax highlighting to look:
Also, I couldn't find any solution for the routes file. Any help would be most appreciated!"
P.S. I enabled the Vim emulator during installation of IntelliJ. I don't know if this had any effect on the syntax highlighting defaults...
Playframework full support in only available in IntelliJ ultimate edition a commercial one.
Community edition (free version) that you probably are using doesn't have any support for playframework it only supports Scala (language).
Routes and *.scala.html files are part of the framework not the language.
You may like to purchase IntelliJ ultimate edition or would like to go for Scala IDE (based on eclipse) which is an open source IDE for java and scala, it seems to have full support for play 2.x.
For *scala.html syntax highlighting
Preferences > Plugins > Install Jetbrains plugin...
Then install the Scala plugin
Restart IntelliJ and syntax highlighting should work.
For routing file highlighting
Preferences > Editor > File Types
Under the registered patterns for HTML Routing Support For Play 2 Framework if *.routes isn't already there, add it. Or add however you plan on naming your routes files.

How to generate JavaScript files from CoffeeScript in IntelliJ IDEA?

I'm trying out CoffeeScript support in IntelliJ, and although the highlighting/completion/refactoring support looks great, I can't figure out a way to automatically compile my .coffee files to their .js counterparts in order to use them in web pages, unit tests, etc.
The documentation mentions using Node for this purpose, but I'm primarily interested in writing client side code. I'd probably be able to create a run configuration that would use Cake to create my JS files, but this won't integrate nicely with IDEA's integrated unit test support, etc.
So... any help?
Use the IntelliJ IDEA plugin: File Watchers.
You would need to install coffee-script package in the global directory. (npm install -g coffee-script).
While you are editing the CoffeeScript file in IntelliJ editor, there would be a notification showing on the top.
Click "Add watcher" and the IDE will compile your code for you on the fly.
More advanced options could be accessed via Project Settings/File Watchers.
See also the official document.

Intellij / webstorm pointing to one project

I have a Play project. I use Intellij for the Java portion, but like to use Webstorm for the javascript part.
How can I do this ? Obviously right now, they keep overwriting the config file... :(
IntelliJ is perfectly capable of dealing nicely with JavaScript. Why do you need WebStorm? I'd recommend that you manage both the Java and web parts of your application in IntelliJ. I believe Play support is available, too:
http://www.jetbrains.com/idea/webhelp/play!.html
IntelliJ IDEA contains all the WebStorm features, these products are not designed to be used together, on the same machine and on the same project at the same time.

Getting auto-completion to work in an IDE using Coffeescript and external Javascript libraries such as jQuery

I would like to ask how other more experienced Coffeescript developers are using their respective IDE's or editors with auto-complete when developing modular libraries and / or referencing external Javascript libraries (jQuery, jQuery UI, RequireJS, Handlebars, ...).
As much as I've tried various IDE's and plug-ins for Coffeescript, none of these seem to support auto-completion when the project consists of several script files. For example: in Visual Studio I can add a commented directive such as /// <reference path="/js/jquery.js" />. I'd need something similar for Coffeescript.
I have tried following without success:
Visual Studio with Web Workbench by Mindscape
Netbeans with dstepanov's Coffeescript plug-in
Aptana with the Coffeescript ruble
Further, I am aware of Jetbrain's WebStorm 3.x support for Coffeescript, unfortunately, my evaluation period expired before I realized I'd need this feature - can anyone confirm that setting the Javascript / Coffeescript Usage Scope works as expected with auto-complete?
So effectively what I am asking: is there an IDE or plug-in, commercial or otherwise, enabling auto-complete for Coffeescript libraries spanning multiple files?
Hate to answer my own question, but after giving JetBrains WebStorm 3.0.2 another demo run on another box, I figured it worked best and does have 'smarter than average' auto-complete for coffeescript projects. It simply loads all coffeescript files in to a global auto-complete context and you can add external libs (cs or js) as well using the project's scope settings. Could be better, but for now I cannot find any other IDE or tool running on PC or Linux, OSS or paid, that tops WebStorm and I don't have the fortunes to explore OSX alleys.
I am sure future tools, plugins, IDE's will pop up for various platforms that do offer great coffeescript module management and proper contextual auto-completion in the editor. So please, do keep the suggestions coming.
Thanks!
I personnaly use Kdevelop. I can't remember if I installed a plugins or something to get it work with coffeescript.
But it works very well, the highlighting colors are pretty, when ctrl+d it add coffeescript commentary and so on.
Also I do make compilation directly in KDevleop.
Well also it's free, I am using it on linux debian but I think it works on most platforms.
Check it there : http://kdevelop.org/