In huge project WebStorm (it can be other product of JetBrains) is always thinking and loading something.
This is really annoying me!
Here is my recipe how to speed up your lovely WebStorm:
Go to Preferences and do next:
Appearance & Behaviour > System Settings > Updates: disable auto update
Appearance & Behaviour > System Settings > Usage Statistics: Uncheck Allow sending data usage statistics to JetBrains
Editor > Live Templates: disable all, leave only what you are really use
Editor > Emmet: disable all emmets
Editor > Intentions: I leave only: CSS, Declaration, JavaScript and Language Injection
Plugins: leave only next (* - can be also disabled in case you don't need them):
CoffeeScript *
CSS Suport
CVS Integration
Git Integration
HTML Tool
IntelliLang
JavaScript Debugger *
JavaScript Intention Power Pack
JavaScript Support
NodeJS *
Perforce Integration
SASS suport *
Project > Directories: Exclude all what you don't use
Languages & Frameworks > JavaScript > Libraries: leave only: HTML and HTML5 / EcmaScript 5
Languages & Frameworks > Compass: disable it
Tools > WebBrowsers: leave only Chrome
Help > Edit Custom VM Options: Edit and increase usage memory pwd:
-Xms1024m
-Xmx1536m
-XX:MaxPermSize=1024m
-XX:ReservedCodeCacheSize=512m
-XX:+UseCompressedOops
So the main idea is next: disable all in Preferences what you really don't use and increase memory for IDE.
There is a "Power Save Mode" setting in the files menu. This will disable some syntax highlighting and stuff, but will improve the speed of any JetBrains IDE.
Also check out ScriptedAlchemy's jetbrains-ide-performance github repository - and be sure to check out the updated settings in the issues.
Disabling unused global symbols (search for it in the settings, it's under inspections) also seems to help.
Related
Trying to create Java EE poject in InteliiJ, but can't find template for it:
I was expecting something like:
Where JavaEE is gone?
There could be several reasons. You could try the following:
Update your JavaEE-plugins. Look in [ File > Settings.. > plugins > updates].
Invalide Caches [File > Invalidate Caches/Restart... ]
Open your idea.log with [Help > Show Log in Explorer] and look for errors and post it here.
Have you changed your Java version? Installed it in a different directory?
Look if your environment variables 'JAVA_HOME' is set to the correct version.
Enterprise templates are only available in the paid ultimate version of intellij.
So, you can either switch to Netbeans or eclipse to use those features for free.
I would like to keep my IntelliJ config files in my dotfiles repo but my ~/.IntelliJIdea2016.1 folder weights > 1.3G :(
~/.IntelliJIdea2016.1/config/ still weights > 215M...
~/.IntelliJIdea2016.1/config/plugins/ contains lots of binaries... not the best candidates for dotfiles :(
Anyone tried to save IntelliJ config without Export/Import settings menu option?
No need to store IntelliJ config file, just use
IDE Settings Sync plugin.
See this post: Better Synchronization of your Settings Across Devices
Sadly, it's not simple. The user configuration folders are not well-documented and have historically included a bunch of default junk, which is slowly being stripped out (see https://youtrack.jetbrains.com/issue/IDEA-128660 and https://youtrack.jetbrains.com/issue/IDEA-163616). The documentation of settings files is also very poor; my request for improvement was declined https://youtrack.jetbrains.com/issue/IDEA-154157).
I version control my settings. If you request access, you can see it at https://gitlab.com/jcrben-staples/dotfiles-group/dotfiles/tree/master/config/intellij-idea-latest with notes at https://gitlab.com/jcrben-staples/dotfiles-group/dotfiles/tree/master/config/intellij-idea-latest/MY_CONFIG_DOCS.md).
I set up my .gitignore to ignore everything by default, and then I whitelist the files that I want. With IntelliJ, I didn't know where to start, so I whitelisted the entire folder and then blacklisted a bunch of the files.
My blacklist doesn't exactly answer your question about what files to include, but it does give you an idea of what to exclude. I'll try to update this if I figure out which ones to include at some point, but it's a mishmash of plugin files and such.
Right now the blacklist looks something like this:
# IntelliJ IDEA stuff
.idea
!config/intellij-idea-latest/**
!projects/bi-idea/workspace.xml
# statistics files
config/intellij-idea-latest/options/statistics*
config/intellij-idea-latest/options/feature.usage.statistics.xml
config/intellij-idea-latest/options/usage.statistics.xml
config/intellij-idea-latest/options/statistics.application.usages.xml
# user files ??
config/intellij-idea-latest/user*
# other
config/intellij-idea-latest/options/atlassian-ide-plugin.app.xml
config/intellij-idea-latest/options/cachedDictionary.xml
config/intellij-idea-latest/options/customization.xml
# has my autobracket disable
config/intellij-idea-latest/options/CodeGlance.xml
# config/intellij-idea/options/editor.codeinsight.xml
config/intellij-idea-latest/options/databaseDrivers.xml
config/intellij-idea-latest/options/debugger.xml
config/intellij-idea-latest/options/dimensions.xml
config/intellij-idea-latest/options/extensionsRootType.xml
config/intellij-idea-latest/options/filetypes.xml
config/intellij-idea-latest/options/find.xml
config/intellij-idea-latest/options/find.recents.xml
config/intellij-idea-latest/options/jdk.table.xml
config/intellij-idea-latest/options/gemmanager.xml
config/intellij-idea-latest/options/github_settings.xml
config/intellij-idea-latest/options/gradle.run.settings.xml
config/intellij-idea-latest/options/extensionsRootType.xml
config/intellij-idea-latest/options/hg.xml
config/intellij-idea-latest/options/ignore.xml
config/intellij-idea-latest/options/markdown.xml
config/intellij-idea-latest/options/multimarkdown.local.xml
config/intellij-idea-latest/options/multimarkdown.shared.xml
config/intellij-idea-latest/options/options.xml
config/intellij-idea-latest/options/other.xml
config/intellij-idea-latest/options/packages.xml
config/intellij-idea-latest/options/pomodoro.state.xml
config/intellij-idea-latest/options/project.default.xml
config/intellij-idea-latest/options/proxy.settings.pwd
config/intellij-idea-latest/options/recentProjects.xml
config/intellij-idea-latest/options/recentProjectDirectories.xml
config/intellij-idea-latest/options/remote-servers.xml
config/intellij-idea-latest/options/runner.layout.xml
config/intellij-idea-latest/options/scratches.xml
config/intellij-idea-latest/options/stubIndex.xml
config/intellij-idea-latest/options/updates.xml
config/intellij-idea-latest/options/usageView.xml
config/intellij-idea-latest/options/vcs.xml
config/intellij-idea-latest/options/window.manager.xml
config/intellij-idea-latest/options/window.state.xml
# turn off those auto-update messages...
config/intellij-idea-latest/port
config/intellij-idea-latest/plugins/*
config/intellij-idea-latest/tasks/*
config/intellij-idea-latest/extensions/
config/intellij-idea-latest/jdbc-drivers/*
# region START UNIGNORE IntelliJ
!config/intellij-idea-latest/scratches/
!config/intellij-idea-latest/consoles/
config/intellij-idea-latest/consoles/.history/*
# General settings
# config/intellij-idea-latest/sonarlint/
config/intellij-idea-latest/javascript/nodejs/**
# config/intellij-idea-latest/options/editor.codeinsight.xml # has my autobracket disable
# endregion END UNIGNORE Intellij
This leaves fair number of files which are not blacklisted - plus I symlink my .idea files sometimes and version control those settings, although workspace.xml has a lot of stuff and it changes all the time (see https://youtrack.jetbrains.com/issue/IDEA-163348).
Also, keep your eye out for "Share" buttons like the one shown for a scope below, as these seem to control whether the setting is shared to a configuration.
The most elegant set up for settings configuration comes from VSCode - hopefully at some point Jetbrains will figure this out and copy them:
You can either 'Share settings through a settings repository' or you can 'Share your settings with the Settings Sync plugin'.
More details can be found at https://www.jetbrains.com/help/idea/sharing-your-ide-settings.html. If the link ever expires please let me know in the comments below.
After installing the newly released IJ14 Community Edition - the quasiquotes (which had been working on IJ13) popped up on the radar.
Is there an IJ setting to enable this?
BTW this is a maven build (and works in 13.1 just fine!). Here is the section of the build related to the quasiquotes. I have not seen any mention of the plugin not working properly in 14, but input here would be appreciated.
<!-- The following plugin is required to use quasiquotes in Scala 2.10 and is used
by Spark SQL for code generation. -->
<compilerPlugins>
<compilerPlugin>
<groupId>org.scalamacros</groupId>
<artifactId>paradise_${scala.version}</artifactId>
<version>${scala.macros.version}</version>
</compilerPlugin>
</compilerPlugins>
UPDATE I just installed the 14.0.1 update from 11/11/14. This time I tried Intellij Ultimate : but Quasiquotes are still not working.
UPDATE I have opened a JIRA with JetBrains. https://youtrack.jetbrains.com/issue/IDEA-133993
I think there is a workaround to get it running:
You have to go to the IntelliJ settings, to the "Scala Compiler" and add a plugin: "/home/YOURUSERNAME/.m2/repository/org/scalamacros/paradise_2.10.4/paradise_2.10.4-2.0.1.jar"
The problem involves the paradise plugin that provides support for quasiquotes with scala 2.10. It is not working in IJ14 presently.
UPDATE The following is new info on the building with Spark page
https://cwiki.apache.org/confluence/display/SPARK/Contributing+to+Spark#ContributingtoSpark-IntelliJ
"Rebuild Project" can fail the first time the project is compiled, because generate source files are not automatically generated. Try clicking the "Generate Sources and Update Folders For All Projects" button in the "Maven Projects" tool window to manually generate these sources.
Compilation may fail with an error like "scalac: bad option: -P:/home/jakub/.m2/repository/org/scalamacros/paradise_2.10.4/2.0.1/paradise_2.10.4-2.0.1.jar". If so, go to Preferences > Build, Execution, Deployment > Scala Compiler and clear the "Additional compiler options" field. It will work then although the option will come back when the project reimports. If you try to build any of the projects using quasiquotes (eg., sql) then you will need to make that jar a compiler plugin (just below "Additional compiler options"). Otherwise you will see errors like:
/Users/irashid/github/spark/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeGenerator.scala
Error:(147, 9) value q is not a member of StringContext
Note: implicit class Evaluate2 is not applicable here because it comes after the application point and it lacks an explicit result type
q"""
^
It's s not q:
val x = 5.0
println(s"$x.toInt")
I loaded spark up in Intellij 13 and the macro paradise backport of quaisquotes still shows an error, I don't see how intellij would be able to support this syntax as it's a compiler plugin:
I am using IntelliJ IDEA 13.1.4 and also tried the latest release 14.
Running SBT I get the following error:
Error:Cannot determine Java VM executable in selected JDK
I have JDK 1.7 installed on my machine and on PATH.
In the logs (~/Library/Logs/IntelliJIdea14/idea.log on MacOS) there's the following stack trace:
2014-11-03 11:22:05,054 [4896641] WARN - nal.AbstractExternalSystemTask - Cannot determine Java VM executable in selected JDK
com.intellij.openapi.externalSystem.model.ExternalSystemException: Cannot determine Java VM executable in selected JDK
at org.jetbrains.sbt.project.SbtExternalSystemManager$$anonfun$10.apply(SbtExternalSystemManager.scala:97)
at org.jetbrains.sbt.project.SbtExternalSystemManager$$anonfun$10.apply(SbtExternalSystemManager.scala:97)
at scala.Option.getOrElse(Option.scala:120)
at org.jetbrains.sbt.project.SbtExternalSystemManager$.executionSettingsFor(SbtExternalSystemManager.scala:96)
at org.jetbrains.sbt.project.SbtExternalSystemManager$$anonfun$getExecutionSettingsProvider$1.apply(SbtExternalSystemManager.scala:54)
at org.jetbrains.sbt.project.SbtExternalSystemManager$$anonfun$getExecutionSettingsProvider$1.apply(SbtExternalSystemManager.scala:54)
at org.jetbrains.sbt.package$$anon$3.fun(package.scala:29)
at org.jetbrains.sbt.package$$anon$3.fun(package.scala:28)
at com.intellij.openapi.externalSystem.util.ExternalSystemApiUtil.getExecutionSettings(ExternalSystemApiUtil.java:590)
at com.intellij.openapi.externalSystem.service.ExternalSystemFacadeManager.a(ExternalSystemFacadeManager.java:201)
at com.intellij.openapi.externalSystem.service.ExternalSystemFacadeManager.a(ExternalSystemFacadeManager.java:178)
at com.intellij.openapi.externalSystem.service.ExternalSystemFacadeManager.doInvoke(ExternalSystemFacadeManager.java:133)
at com.intellij.openapi.externalSystem.service.ExternalSystemFacadeManager$MyHandler.invoke(ExternalSystemFacadeManager.java:270)
at com.sun.proxy.$Proxy57.getResolver(Unknown Source)
at com.intellij.openapi.externalSystem.service.internal.ExternalSystemResolveProjectTask.doExecute(ExternalSystemResolveProjectTask.java:48)
at com.intellij.openapi.externalSystem.service.internal.AbstractExternalSystemTask.execute(AbstractExternalSystemTask.java:137)
at com.intellij.openapi.externalSystem.service.internal.AbstractExternalSystemTask.execute(AbstractExternalSystemTask.java:123)
at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$2.execute(ExternalSystemUtil.java:475)
at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$3$1.run(ExternalSystemUtil.java:543)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.run(ProgressManagerImpl.java:609)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$7.run(ProgressManagerImpl.java:410)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$3.run(ProgressManagerImpl.java:194)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.a(ProgressManagerImpl.java:281)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:233)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:181)
at com.intellij.openapi.application.impl.ApplicationImpl$10$1.run(ApplicationImpl.java:640)
at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:405)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
at org.jetbrains.ide.PooledThreadExecutor$1$1.run(PooledThreadExecutor.java:56)
What can be the reason for this?
You should be able to work it around by setting the jdk from the settings not from the open/import project dialog.
From the welcome screen, go to Configure -> Project defaults -> Project structure and add the jdk.
Opening the sbt project should work well then.
Found solution from here
Another way to set JDK is from your current module/project settings (for your current project)
PickOpen Module Settings from project context menu (or default hit F4), then from left tab select Project and point correct Project SDK on dropdown.
The issue is usually caused by a wrong JDK version in ".idea/sbt.xml", e.g.:
<option name="jdk" value="1.7" />
This option is not updated accordingly when the Project SDK is changed, see SCL-10085. If you have the other JDK (1.7 in my example) generally configured, no error will occur, but the Project SDK will silently be changed back. Otherwise, this error occurs.
The problem can easily be resolved by manually editing the value in ".idea/sbt.xml" to the right JDK version.
Same error also occurs when you try to do a refresh in "SBT tasks".
Open
Preferences -> Language & Frameworks -> Scala Compiler Server
Turn on
Run compile server (in external build mode)
Once you done with refreshing the project, turn it off again to enable hotswapping back when you change your code in the editor.
I had to open Settings -> Language & Frameworks -> Scala Compiler Server
Then set the JVM SDK there, which was <No SDK>.
This was in addition to setting the Project SDK in Project Structure -> Project.
See the screenshot here.
IntelliJ 13.1.6 > File > Project Structure > set Project SDK
I got the same problem after I delete Java1.6 and Java1.7 from Project Settings(with Java8 as default).
Finally I solve the problem by change SBT JVM config to Custom Java(Settings -> Build, Execution, Deployment -> Build Tools -> SBT).
For me the above suggestions did not help for some reason. However, I did figure out that under Project Defaults > Project Structure (Welcome screen) my default Project SDK was set to the Go SDK.
What worked for me was setting this default SDK to the Java JDK.
For me, I had selected the JDK in "Open Module Settings" > Module > Dependencies > Module SDK.
However, SBT was looking for JDK at project level which is set in "Open Module Settings" > Project > Project SDK as #michasm has pointed out above
The latest Nightlies of the Scala plugin change how the project JDK is set, which should solve this in most cases. Let me know if it still breaks on some cases.
This happened to me in a multi-language project when my primary module's Project SDK was Python and I was trying to add a secondary module that was JDK (importing an sbt project).
I had to temporarily switch the primary module's Project SDK to JDK in order to add the sbt module. I then had the ability to go back and change each module to the correct SDK.
I am running Jasmine tests on Karma (latest, 0.12.14) from IntelliJ IDEA (latest, 13.1.2) on OS X.
IntelliJ just uses Karma plugin that points to my karma installation: /usr/local/lib/node_modules/karma
The problem is that Karma watcher doesn't pick new changes from JS files. When I run tests again, everything is fine. It's not a huge issue (they run pretty fast), but it's annyoing to always run tests twice after you do a change.
Anybody experienced similar issue?
Add the following property to your karma.conf.js file:
usePolling: true
I put it after the autoWatch flag.
Reference: AutoWatch doesn't work #895
Finally got this to work. This is a known issue when using Karma in IntelliJ with build tools like Webpack / Gulp / etc... and that the post-processed files are outside of the files that Karma is directly serving.
The workaround is to manually modify the IntelliJ config in this file: ...\plugins\js-karma\js_reporter\karma-intellij\lib\intellijRunner.js
At or near line #75 in the runWithConfig() method, change the refresh property --> true.
See this comment for details
Had this issue in both IntelliJ and Webstorm and fixed both the same way.
In the case of using IntelliJ IDEA, maybe try
Preferences > General > Uncheck "safe write"
I am not sure if question is still actual, but i found a solution (or just a workaround).
I changed this file C:\Users\MyUser\.IntelliJIdea14\config\plugins\js-karma\js_reporter\karma-intellij\lib\intellij.conf.js a little bit here:
config.singleRun = false;
var originalAutoWatch = config.autoWatch;
//config.autoWatch = false; <-- this line
config.autoWatchBatchDelay = 0;
For sure the plugin maintainers had some reason to add this line, but for me this worked fine enough (there were isolated crashes I can't reproduce).
I am not sure about older versions of intelij but I am using 2016.3 (the latest version at the time of writing this) and it all works OK assuming karma config has autoWatch: true.
Having exactly the same problem all I have to do was to switch on Toggle auto-test in intelij and all started working fine without any other change.
Please check autoWatch property in karma config file set to TRUE.
Also if you are using Sublime Text 3 then set "atomic_save": false in your user settings as it also causes issues with watches. see here
Macros worked for me. After trying usePolling: true, modifying the intellijRunner.js, and unchecking Safe Write I still had to save or run tests twice to catch the changes.
Made a compound macro to both Save and Run File and Save and Re-Run Test. Then I overwrote each commands' shortcut via Keymap.
How to bind multiple actions to a shortcut
screenshot of macro: Save and Run test at cursor
screenshot of macro: Save and Re-run last test
screenshot of Keymap for macros