Sometimes you might need to exclude a single file from your project, so that it will be ignored by inspections, code completion, etc. This is done using the action.
When a file is marked as plain text, IntelliJ IDEA does not use it anymore for code completion and navigation. Such file is shown
as plain text in the editor, and is denoted with a special icon
in the
Project tool window.
This action is not applicable to Java files and binaries.
The reverse action is also available: you can return a file to its original type, using the action.
In the context of a PHP project, you can also exclude entire PHP archives
(.phar files) to prevent multiple declaration conflicts
between classes in a .phar archive and the corresponding classes in the installed vendors directory.
On this page:
- Marking a file as plain text
- Marking a file with its regular type
- Excluding a .phar archive from a project
- In the Project tool window, select the desired file.
- On the context menu of the selection, choose .
- In the Project tool window, select the desired file, marked with
icon. - On the context menu of the selection, choose .
-
In the Project tool window, select the required
.phararchive and choose Exclude phar from project on the context menu of the selection.