Hey Nikita!
I'm rolling into Clojure and setting up dev env, and I've heard in your talk on Clojure/north in Toronto the story about this package. That's why I've installed it. But SublimeREPL doesn't work with it by default. It runs lein repl
in background, opens new tab for *REPL* [clojure]
, however when I send any selected code there it says it can't find a REPL for clojurec
.
I've fixed this by defining user configs for Sublime REPL inside ~/Library/Application Support/Sublime Text 3/Packages/User/SublimeREPL/config/Clojure
. I've added Main.sublime-menu
:
[
{
"id": "tools",
"children":
[{
"caption": "SublimeREPL",
"mnemonic": "R",
"id": "SublimeREPL",
"children":
[
{"caption": "Clojure",
"id": "Clojure",
"children":[
{"command": "repl_open",
"caption": "ClojureC",
"id": "repl_clojurec",
"args": {
"type": "subprocess",
"encoding": "utf8",
"cmd": {"windows": ["lein.bat", "repl"],
"linux": ["lein", "repl"],
"osx": ["lein", "repl"]},
"soft_quit": "\n(. System exit 0)\n",
"cwd": {"windows":"c:/Clojure",
"linux": "$file_path",
"osx": "$file_path"},
"syntax": "Packages/sublime-clojure/ClojureC.tmLanguage",
"external_id": "clojurec",
"extend_env": {"INSIDE_EMACS": "1"}
}
}]
}
]
}]
}
]
And Default.sublime-commands
:
[
{
"caption": "SublimeREPL: ClojureC",
"command": "run_existing_window_command", "args":
{
"id": "repl_clojurec",
"file": "config/Clojure/Main.sublime-menu"
}
},
]
They defines new REPL as clojurec
and also applies sublime-clojure
to it.
Now REPL for ClojureC is available in menu:
And I've checked the syntax highlighting by testing it with the one of the strings from your testing files. Before:
Now:
And of course everything works properly with sending selected code into REPL.
I'm not sure whether it's a big deal or not, because I haven't had any Clojure experience yet, but when I googled plugins for REPL I got an impression that this one is the most popular for this purpose. So maybe you need to improve the docs by adding Troubleshooting section.