4

Currently I am using LightTable to run clojure projects, and with Leiningen I can specify a version for a project. However, for .clj files that are not part of a project, it seems the LightTable REPL says the clojure version is 1.5.1.

I would like to set it to 1.7.0 for all .clj files, is there a way to do this?

user2283597
  • 229
  • 2
  • 20

1 Answers1

5

It is described in LightTable FAQ:

How do I set the default Clojure version when running Instarepl outside of the context of a Clojure project?

Update plugins/clojure/runner/resources/project.clj by adding/changing :dependencies [[org.clojure/clojure "x.x.x" ]] where x.x.x is of course the Clojure version you want to use by default in your Instarepl sessions whenever LightTable doesn't run in the context of a Clojure project (i.e. double clicking on a shortcut on the desktop to run LightTable).

Per http://docs.lighttable.com/#plugins-directory, running the command App: Light Table version to get plugin directory.

qxg
  • 6,955
  • 1
  • 28
  • 36
Piotrek Bzdyl
  • 12,965
  • 1
  • 31
  • 49
  • Thanks for the info, I have given this a try, yet even after adjusting this (from `1.5.1` to `1.7.0`), when running `clojure-version` in a .`clj` file, the result is still `1.5.1`. – user2283597 Apr 20 '16 at 12:14
  • Please, provide the full path of the `project.clj` file you modified. Also did you restart your LightTable instance? I tested it locally and it worked correctly. – Piotrek Bzdyl Apr 20 '16 at 12:16
  • I did restart, but it didn't seem to have any effect. Here is the full path from the file I edited `C:\Desktop\lighttable-0.8.1-windows\resources\app\plugins\Clojure\runner\resources\project.clj` – user2283597 Apr 20 '16 at 12:23
  • I think you need to change the file under different location: http://docs.lighttable.com/#plugins-directory. In your case it will be somewhere under `C:\Users\\AppData\Local\LightTable`. – Piotrek Bzdyl Apr 20 '16 at 12:26
  • Ah did not realise the correct file was in AppData. Modified and it has correctly changed to version `1.7.0`. – user2283597 Apr 20 '16 at 12:29
  • How can I set the global Light Table Clojure version? For me the value in using Light Table is in not having to set up a project each time and seeing quick evaluation results. – Petrus Theron Jan 09 '18 at 10:29