Include Files for autocompletion outside src-directory in Intelij - intellij-idea

Intellij always index every file in my project to give me the best autocompletion-suggestions. But there is one probelm it only indexs the files from src - directory for autocompletion.
now i got some css styles from a node-module which i also want to get autocompletion-suggestions.
i could fix this with 2 bad solutions:
by copying those css files directly inside the src
dir. The problem is now that when the styles inside node modules gets
updated the copyied files, didn't got there update.
by marking the complete node_modules dir as src folder,
but then i get autocompletion and Ctrl+Shift+N - suggestion also from
this dir that should happen only for one specific node-module.
Can i tell intellij that it should also use those specifics files for autocompletion? And not only those from the src-folder?
I'm using Intellij IDEA 2016.1.3

Related

IntelliJ IDEA - Directories appearing in Project Files but not in Project

So I created an empty project, but when I create a new directory in the Project window, it does not show up. The directory is actually created, and if I navigate to the Project Files list I can see it there, but as far as I can tell there is no way to make even my src folder part of the actual project. This creates all kinds of problems when I have to move/refactor files, and I'm amazed that something so common and simple is so difficult.
You've created a folder, not a package. If ur using maven or grade, can I suggest u use them to generate an intelij project for you. The command escapes me but a quick Google should tell you
You can manually mark your directory as a sources root:

Best way to classify/mark babel generated files in IntelliJ

I'm using IntelliJ with Gulp (with the babel and sourecemap plugins) to help me transpile my source ES6 to ES5. What is the best way to mark these generated files?
They are being sent into a seperate dist folder but I want them to behave in the following way:
I don't want them to show up in usage/code search
I want their changes to be detected by the integrated source control
I have tagged them as excluded but I read in IntelliJ's docs that this will prevent the folder from being watched for changes. Anyone have a good way of doing this?
Excluding the dist folder via Mark directory as/Excluded is the right way to go: files in excluded folders are not indexed/show up in usage/code search, but they can be version controlled, so both your requirements are fulfilled.

Dart packages problems with intellij IDEA

I'm actually trying to use Dart in IntelliJ IDEA, and I have successfully install the plugin for it, but I face numerous others problems.
But the problem I want to resolve the most, is the fact that for some packages, IntelliJ doesn't show the sources inside it and not with particular reason...
The whole project work in Dart Editor, and launch correctly, so the problem is not from pubspec.yaml.
To makes me more understandable, I will say that I "pub get" correctly the packages A and B, so they appear as folder link in IntelliJ :
http://imgur.com/rb0ZSVA
But like you see, I cannot enter in the b package to see the files inside it. I have checked the structure of the two folders without noticing any difference.
The more ridiculous in that is, I can see some of the files inside the B package in the editor of IntelliJ via Ctrl+Click in the dart files that import the files inside the B package. And it doesn't work for all of them ...
'b' is a 'path package' in your project. That means that b original source code is located on your computer and you specified path to it in pubspec.yaml. IntelliJ IDEA excludes all copies and leaves only original files in project. Root 'packages' folder is not excluded, but all its copies (for example in web folder) are excluded. packages/b is a copy and it is excluded. To work normally with source files from b package you should add path to b as a separate content root: Project Structure | Modules | your Dart module | Add content root.
In IntelliJ IDEA 14 excluded folders are visible by default. Use cases when you need to see excluded folder contents are rare so you may safely hide them (the option is under the gear in the Project View tool window title). With it you will see empty node in packages/b with a hint that it is just a link to b/lib folder. And anyway you should have path to b configured as a content root.
You should not open files of projects currently open in IntelliJ from the package folder but instead directly from the project. The b/lib after the folder icon indicates that this package is part of your currently opened IntelliJ project (may added as a Resource Root)
When you navigate to a referenced file ctrl+click the file is not opened from the packages symlink but from the package in your IntelliJ project (as you should do it manually as well).
The solution is to update IntelliJ to the Early Access update (139.2).
So this question will be useless in the next update, I will delete her at that moment.

How to force IntelliJ to use a different home folder

I have a computer with two hard drives. In the first one, an SSD disk, I have Windows partition (C) and on the second one (D), a raid volume, I install all the programs. I also moved my user folders (desktop, documents, downloads, pictures and videos) to D:/Users/David.
After installing IntelliJ Idea on D:/Program Filles(x86) a .IntelliJIdea13 directory appeared on D:/Users/David. No problem with this as all was working nice. Then I installed Scala plugin, created a new SBT project and build it. After this, the .sbt directory used by SBT was in C:/Users/David/.sbt but the references to the libraries in my project are pointing to D:/Users/David/.sbt. The question is, how can I force IntelliJ Idea or Scala plugin to download the libraries to D:/Users/David.sbt?
Not 100% sure if this can be a solution, you can change the HOME folder of Intellij IDEA. Look for the folder where the idea executable is. In Linux I have on
~/applications/idea13/bin
On Windows you can check the properties of the menu item. There should be file idea.properties that contains the home folder location of the idea files.
You can find more information here that describe more details:
Locations can be changed by editing the following file:
IDE_HOME\bin\idea.properties
Follow the comments in idea.properties file to change the defaults,
make sure to un-comment the lines defining these properties:
idea.config.path
idea.system.path
idea.plugins.path
idea.log.path
On the other hand you can change the location of your project to D:/Users/David. you should also have a look inside the project folder, there should be a .idea folder with has a library directory. They contains the location of the libs used in the project with their paths.
As dawez allready answered, you should edit idea.properties to set config, system, plugins and log paths.
But if you want to change the user.home path, then you must edit idea.exe.vmoptions file. Just add the following at the end of the file:
-Duser.home=your_new_user_home_path
If you use idea64.exe then you should edit idea64.exe.vmoptions file.
JetBrains had added complete set of features to support such a case and this is described here:
Changing IDE default directories used for config, plugins, and caches storage

IDEA: How do I see subdirectories in an empty project?

I wish to use IDEA to edit a directory full of files of no particular type. So, I create a new project of type Empty Project and point it at my directory.
The project view now shows the files in the directory itself. But, it doesn't show any subdirectories. This is very strange.
Even more strangely, I can still use New -> Directory to create a new directory. From the command line I can see that the directory has been created; but, from within IDEA, it's still not appearing.
What's going on here? And, more importantly, how can I actually get it to show me my subdirectories?
This is IntelliJ IDEA 12.1.1. I did find IntelliJ does not show project folders, which sounds similar. But, it is referring to a different version of IDEA and they're not using an Empty Project. So, I don't think it's relevant.
In IntelliJ, you have to create at least one module. As CrazyCoder said in the comments, adding a module sets the root folder of what to display in the Project pane.
Here are steps that I took to show empty folders.
In a terminal window
mkdir one
mkdir one/two
mkdir one/two/three
mkdir one/two/three/four
In Intellij 15.0.2, I created a new project, selected Empty Project and set the Project Location to the one folder.
After creating the project, IntelliJ prompts me with a Project Structure dialog with Modules selected in the navigation tree. I clicked the '+' button in the middle pane to add a module. I chose Static Web as the module type to prevent creation of an additional src folder. I set the Content root and the Module file location of the module to the same one folder.
I clicked Finish and then Ok. This gave me this structure