Sublime Forum

Help wanted with build system "file_regex"

#1

I got the leiningen build system setup in ST2 (from someone on Github) but am struggling with the “file_regex”
I have:
{
“cmd”: “lein”, “compile”, “:all”],
“file_regex”: “^^()]\((…?):([0-9])\).”,
“selector”: “source.clj”,
“working_dir”: “$project_path”,
}
Now when I click on the error line such as:
Exception in thread “main” java.lang.RuntimeException: EOF while reading, starting at line 99, compiling:(domain.clj:99)
at clojure.lang.Compiler.compile(Compiler.java:7190)
then ST creates a new domain.clj in the project root directory.
Is there some clever way I can get it to open the correct file?
The standard lein project layout is that files are folders per namespace under $project_path/src/
There is nothing in the error output that gives you the directory of the file, just the name domain.clj
As a starting point I could live with the assumption that src files are in the src/ directory itself

0 Likes