Ignoring javascript autocomplete files in IntelliJ

I am wondering how to delete specific files from IntelliJ autocomplete. More precisely, things received through Maven. As an example, replace will generate a long list of declarations:

enter image description here

Most of them are random declarations of variables and functions in JS files that come from Maven dependencies (I develop Confluence plugins, therefore, Confluence dependencies). I am wondering how am I doing IntelliJ to ignore all these files? For files in a project, I can simply mark the directory as ignored, but since these files are in my Maven repository, I cannot do this.

+6
source share
1 answer

You might want to try the area setting in IntelliJ to exclude files coming from libraries or other sources.

the library area defines the set of files and folders in which the library is considered as a library , that is, it is write protected, excluded from checking for errors and refactoring affects the completion list and highlights.

By default, all predefined libraries and libraries loaded from IntelliJ IDEA provide completion, resolution, selection, and are treated as libraries in any project file. In other words, their area of ​​use is the entire project.

Libraries that you create yourself are not considered libraries in any of the files unless you explicitly specify their scope.

  • Open the settings dialog.
  • In the left pane, expand JavaScript node libraries and select a Usage Area .
  • In the right part (on the "Scope" page):
    • To make the library accessible in all project files, click the Library cell in the very top line ( Project ) and select the library in the list that appears.
    • To specify a narrower scope, expand the nodes in the File / Directory column to see the folder or file for which you want to limit the scope of the library. Click the Library cell to the right of the corresponding folder or file and select a library from the list.
  • Click OK in the Settings dialog box.

https://www.jetbrains.com/idea/help/configuring-javascript-libraries.html#d76972e18833

0
source

Source: https://habr.com/ru/post/985515/


All Articles