IntelliJ IDEA
 
Get IntelliJ IDEA

File Watchers

Last modified: 08 October 2024

The page is available when the File Watchers plugin is enabled. For more information about configuring File Watchers, refer to File Watchers. The File Watchers plugin is not bundled with IntelliJ IDEA, but it can be installed on the Settings | Plugins page, tab Marketplace, as described in Installing plugins from JetBrains Marketplace.

A File Watcher is an IntelliJ IDEA system that tracks changes to your files and runs a third-party standalone application. IntelliJ IDEA provides predefined File Watcher templates for a number of such standard popular third-party tools (compilers, compressors, prettifiers, and others).

You can also configure a custom File Watcher to run any other third-party tool.

File Watchers have two dedicated code inspections:

  • The File Watcher available inspection is run in every file where a predefined File Watcher is applicable. If the project has no relevant File Watcher configured, IntelliJ IDEA suggests to add one.

  • The File Watcher problems inspection is invoked by a running File Watcher and highlights errors specific to it.

The page consists of a list of available File Watchers and a toolbar to manage this list.

For each File Watcher, you can decide if it’s going to be available only in the current project (select Project from the Level list) or for all projects (select Global).

To activate a File Watcher, select the checkbox next to it. When a File Watcher is enabled, it starts automatically as soon as a file of the selected type and in the selected scope is changed or saved, refer to Configuring advanced options. If an error occurs while a File Watcher is running, the File Watcher is automatically disabled. To restore the status, enable the File Watcher manually.