Is there any IntelliJ property which specifies file types to be excluded from being indexed?

IntelliJ indexes file types specified under 'Settings -> File Types'. If my project contains .java and javascript files, IntelliJ indexes both .java, .js related files. If I dont want .js files to be indexed, I have to remove file type mapping for .js extension from 'Settings -> File Types'.
Is there any IntelliJ property which can be used to exclude file types to be indexed? idea.properties seems to be a proper place for such property [some thing like: EXCLUDE_FILE_EXTENSIONS=.js,.applejs].

6 comments
Comment actions Permalink

Hello chandra,

No, there is no such property. If the support for a certain file type (such
as JavaScript) in IntelliJ builds some indexes, it also relies on the existence
of those indexes in the implementation of its features. There is no possibility
to turn off indexing and have all the remaining features still work.

IntelliJ indexes file types specified under 'Settings -> File Types'.
If my project contains .java and javascript files, IntelliJ indexes
both .java, .js related files. If I dont want .js files to be indexed,
I have to remove file type mapping for .js extension from 'Settings ->
File Types'.

Is there any IntelliJ property which can be used to exclude file types
to be indexed? idea.properties seems to be a proper place for such
property .


--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

It is acceptable that if indexing of javascript files is not done then any features that work on javascript files will not be available.
Consider a scenario where the project .ipr/.iml contains .js files where as user doesnt want any of the javascript related features. It would be better if IntelliJ doesnt index those files.

0
Comment actions Permalink

Hello chandra,

Then you can map the .js extension to the plain text file type.

It is acceptable that if indexing of javascript files is not done then
any features that work on javascript files will not be available.

Consider a scenario where the project .ipr/.iml contains .js files
where as user doesnt want any of the javascript related features. It
would be better if IntelliJ doesnt index those files.


--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

Is there a config variable to specify such mappings (like: .js, .py etc to plain text).
As of now, I need to do this by editing file type mappings from Settings -> File Types.

0
Comment actions Permalink

That's what I do indeed. I map it to a text file, and manually added some syntax coloring features to it with the limited settings for that.

I think it would be really useful if IntelliJ provided you fine-grained settings to tell it stuff like don't index this filetype but do syntax highlight it with what you can do without indexing.

Allowing such settings and tweaking would make it much easier for a user to use IntelliJ for what it's good for, while disabling things that slow it down that you don't need.

0
Comment actions Permalink

Hello chandra,

I don't get what you want. What would be the benefit of having a config variable
when a UI is already available? If you need to modify these settings programmatically,
you can do this via the FileTypeManager API, or on a more fine-grained basis
using the LanguageSubstitutor extension point.

Is there a config variable to specify such mappings (like: .js, .py
etc to plain text). As of now, I need to do this by editing file type
mappings from Settings -> File Types.


--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0

Please sign in to leave a comment.