WSL and file watchers
Answered
Is there any way to setup file watchers using a program within WSL?
Example: I want black to run as a file watcher, which can easily be done within "normal" environments by simply following the docs: https://black.readthedocs.io/en/stable/editor_integration.html
Black is installed via my virtualenv within WSL - is there any way to point a file watcher/external tool to a program inside my WSL?
Please sign in to leave a comment.
Hi,
There is no such feature at the moment. Please feel free to submit a feature request about it to our issue tracker using the link https://youtrack.jetbrains.com/issues/PY
You can do this using `wsl` as the Program, and putting the actual command in Arguments. See image for an example running compiledb in wsl from clion
@... Chapeau! best tip in a long time ;)
I have been looking for that for a long time!
@... I'm DISGUSTED by how brilliant that is. Apparently even the devs didn't know about this possibility. Thank you so much!
@... Thanks man, spent days on this.
I had a watcher setup for my Windows projects, but using Laravel Sail now and my projects are on my WSL Ubuntu so the Windows watcher no longer worked.
For future people with a similar issue. I changed my watcher Program from
$ProjectFileDir$/node_modules/.bin/handlebars.cmdto
wsland ran my Handlebars precompiler as usual in Arguments
handlebars resources/_templates/ -f resources/js/templates.js -e handlebars