JetBrains IDEs
Inotify watches limit
Section titled “Inotify watches limit”For the IDE warning that the inotify watch limit is too low. Check the current value first, because newer kernels may already default to 1048576:
sysctl fs.inotify.max_user_watchesecho 'fs.inotify.max_user_watches = 1048576' | sudo tee /etc/sysctl.d/idea.confsudo sysctl --systemRestart the IDE. Source: Inotify Watches Limit (Linux).
Desktop entries
Section titled “Desktop entries”The Toolbox App and Tools | Create Desktop Entry create them for you. Write one by hand only for a manual tarball install, e.g. ~/.local/share/applications/jetbrains-phpstorm.desktop, with /opt/phpstorm pointing to the extracted directory:
[Desktop Entry]Type=ApplicationName=PhpStormIcon=/opt/phpstorm/bin/phpstorm.svgExec=/opt/phpstorm/bin/phpstorm.sh %fCategories=Development;IDE;Terminal=falseStartupWMClass=jetbrains-phpstormLightEdit
Section titled “LightEdit”LightEdit mode as a separate application for single files, in ~/.local/share/applications/PhpStormLightEdit.desktop:
[Desktop Entry]Type=ApplicationName=PhpStorm LightEditComment=Open files in PhpStorm LightEdit modeIcon=/opt/phpstorm/bin/phpstorm.svgExec=/opt/phpstorm/bin/phpstorm.sh -e %FMimeType=text/plain;Terminal=falseMake it the default application for text files:
update-desktop-database ~/.local/share/applicationsxdg-mime default PhpStormLightEdit.desktop text/plainFile Watchers
Section titled “File Watchers”Custom watchers live in Settings | Tools | File Watchers.
Macro preview
Section titled “Macro preview”Prints the values of path macros, so you can check them before using them in a real watcher. Set Program to printf and Arguments to (one line):
"%s\n" "FileDir: $FileDir$" "FileName: $FileName$" "FileNameWithoutExtension: $FileNameWithoutExtension$" "FileExt: $FileExt$" "FilePath: $FilePath$" "FileRelativePath: $FileRelativePath$" "ProjectFileDir: $ProjectFileDir$"
Node.js from nvm
Section titled “Node.js from nvm”File Watchers do not load your shell profile, so they don’t see Node.js installed by nvm. Add to the profile:
export NVM_SYMLINK_CURRENT=trueOpen a new shell and run nvm use once. This creates ~/.nvm/current. In the watcher set (the IDE needs absolute paths):
| Field | Value |
|---|---|
| Program | /home/user/.nvm/current/bin/npm |
| Arguments | run my-script $FilePath$ |
| Working directory | $ProjectFileDir$ |
| Environment variables | PATH=/home/user/.nvm/current/bin:$PATH |
The symlink follows the last nvm use in any shell, and several shells switching versions at once can race. See the nvm notes.
File types
Section titled “File types”Patterns worth adding in Settings | Editor | File Types:
| File type | Patterns |
|---|---|
| Dockerfile | Dockerfile.* |
| JSON | *.json.dist, composer.lock |
| YAML | *.yml.dist, *.yaml.dist |
Plugins
Section titled “Plugins”- .env files
- .ignore
- Legacy Icon Pack for 2018.2+
- PHP Annotations (only for legacy Doctrine annotations)
- PHP Toolbox
- SonarQube for IDE
- String Manipulation
- Symfony Plugin

