Skip to content

IntelliJ IDEA fsnotifier for WSL (Windows Subsystem for Linux)

License

Notifications You must be signed in to change notification settings

int128/idea-fsnotifier-wsl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IntelliJ IDEA fsnotifier for WSL CircleCI

IntelliJ IDEA for Linux works on WSL (Windows Subsystem for Linux; Bash for Windows) as well, but the file watching feature is not available for now. It shows the following warning on startup:

⚠️ External file changes sync may be slow. File watcher gave up to operate.

screenshot

This project provides fsnotifier module that allows the file watching feature works on WSL. External file changes will immediately appear.

How to use

Download the latest release and install it into $IDEA/bin.

ls -la fsnotifier64
cp -av fsnotifier64 ~/bin/idea-IC-*/bin/

Run IDEA and check if the warning does not appear.

Build from source

Make sure you have a C compiler.

sudo apt install build-essential
cc -v

Make and install it into $IDEA/bin.

./make.sh
ls -la fsnotifier64
cp -av fsnotifier64 ~/bin/idea-IC-*/bin/

How it works

Currently fsnotifier64 fails on WSL, because WSL does not provide /proc/sys/fs/inotify/max_user_watches and /etc/mtab.

This skips checking /proc/sys/fs/inotify/max_user_watches. Also it reads from /proc/mounts instead of /etc/mtab. See commits for more.

Contribution

This is based on JetBrains/intellij-community/native/fsNotifier/linux.

Feel free to open an issue or pull request. Original and this are public under Apache License 2.0.