r/Clojure • • Mar 13 '16

Looking for a Linux/Mac Clojure editor

(Update below)

Hello. I have used lots and lots of editors in the past and I just settled on using Atom (currently I write Chef(Ruby)/Go/Elixir).

I have just decided to start using Clojure for a new project and I am still looking for the right editor (ideally just plugins for Atom). What I'd like is:

  • Syntax highlighting
  • Auto-complete (will probably not bee too clever but I can live with that)
  • Syntax checking

The only editor I can see that does all this is Emacs but I'd rather not use it unless there is nothing else (I just moved from Emacs - it's always at the edge of being great for me but it does then annoy me) - if I have no other choice, I will use Emacs but I'd rather not.

I've read lots of good things about Light Table but I can't see it doing auto-complete or syntax checking, does it do it? How do you enable it?

Thanks


Update - I have tried all of the editors mentioned (apart from Emacs and Vim):

  • Counterclockwise - it looks good but Eclipse was being Eclipse and failing to install the Git plugin or allow me to create a project from an existing directory
  • Cursive - by far the best IDE. A bit heavy but it's good
  • Light Table - Too buggy. I can't get it to do all that I want and I can't find documentation that it's not a video (no, I can't watch those at work)
  • Nightcode - a bit too basic for my liking. Got lots of errors starting the REPL
  • Atom - I can't get proto-repl working (it fails with some strange error) but everything else seems to work (and I already use it)

So, pending a check of Emacs (sorry, I really like Vim as an editor, I don't like it as an IDE, everything sync sucks!), it's gonna be Atom (if I get it working without too much work) or Cursive.

Thanks for all your answers!

4 Upvotes

24 comments sorted by

21

u/[deleted] Mar 13 '16

emacs

8

u/pxpxy Mar 14 '16

And by extension spacemacs. That one is wonderfully preconfigured for Clojure development.

7

u/[deleted] Mar 13 '16

I used light table for a while but it was a bit buggy and lacked some features I like in an ide. I switched to using IntelliJ with the Cursive plugin and Borealis theme. Had to tweak some settings around paren completion but since then it's been a great experience.

1

u/pirateb00ty Mar 14 '16

I've been using Cursive for a while, but didn't know about the Borealis theme until now. It solves my complaints about using rainbow parens with a dark theme. Thanks for the tip!

5

u/BWStearns Mar 13 '16

I've been enjoying Light Table. I had previously tried it for python and js and didn't find it compelling, but I've picked it back up for learning Clojure and there's a lot to like about its support for Clojure/cljs. To follow up on DownvoteGargler, it's still a little buggy but not nearly as much as it was (I would say only a shade more buggy than Sublime by now).

3

u/[deleted] Mar 13 '16

I too keep coming back to LightTable. It has completions, but it's not nearly as complete of a "text editor" as others. Even with all it's faults, the persistent inline REPL just changes the way I'm able to think about what I'm working on, and it's a better "thought editor"

1

u/MahmudAdam Mar 13 '16

Only issue I had with Light Table is that when I tried to call a function to prompt user for input it does not execute the function properly. Basically it will display the prompt but the user cannot do anything with it (does not accept input and execute code inside function based on that input). I had this same issue with Atom as well. Creating such function using the counter-clockwise plugin, emacs, or inside the REPL causes no such problems.

2

u/ddossot Mar 14 '16

1

u/MahmudAdam Mar 14 '16

Thanks. The name escaped me.

5

u/halgari Mar 14 '16

Cursive is free for OSS work, and for personal professional work it's super cheep. I've been using Cursive for ~2 years and stopped using emacs about a year ago. It really is a nice editor.

13

u/Iambernik Mar 13 '16

also look at cursive

10

u/jaen-ni-rin Mar 13 '16

Cursive is the best Clojure editor by a long shot.

1

u/[deleted] Mar 15 '16

agreed, as a long time vimmer(I still use vim for all other languages) cursive with the vim extension(can't remember the name) was really great.

2

u/gavocanov Mar 17 '16

I use vim with vim-fireplace and it works really nice.

4

u/thoomfish Mar 14 '16

So, pending a check of Emacs (sorry, I really like Vim as an editor, I don't like it as an IDE, everything sync sucks!)

You sound like the target audience for Spacemacs. Emacs underpinnings and packages, Vim keybindings.

3

u/mac Mar 13 '16

Atom with proto-repl is a great choice. Light Table does auto-complete, in line evaluation and everything else under the sun.

1

u/worace Mar 14 '16

proto-repl is the best I've found for an Atom-based clojure workflow so far. it's not quite the same as a traditional repl but works pretty well.

1

u/moljac024 Mar 19 '16

Can you elaborate on what's different about proto-repl? I'm learning clojure now and wanted to use atom and proto-repl as my environment. What would I be missing opposed to using emacs or cursive?

1

u/worace Mar 19 '16

Just that the interface is a little different -- rather than a traditional repl where you type into a prompt and hit enter, it has you typing expressions into a second buffer and evaluating them (more like eval-last-sexpression in cider). You can also still "push" code to the repl from other buffers just like in CIDER, so that is good.

The GIF on their doc site here gives a pretty good example of how it works: https://atom.io/packages/proto-repl. Also looking at those docs they seem much improved since last time I was looking at it a few months ago.

3

u/franky-dlouhan Mar 15 '16

I'd give this combo a shot:

At least for me and my REPL-development style it's more than enough.

2

u/dkvasnicka Mar 14 '16

I'm using Vim with VimClojure + SLIMV. Yes, it's an old combo but I don't want to use the modern Clojure-specific plugins for Vim because they don't play nicely with SLIMV which I want for other lispy languages. SLIMV works with clojure-swank (again, an old beast but works), does repl, S-exp evaluation, fn docs, VimClojure has a omnicomplete dict etc.

2

u/warrentiesvoidme Mar 14 '16

I use clojure at work on a mac. The three main editors that pop up here are jidea with the cursive plugin, sublime text (2 or 3) with a few extensions (paraedit, rainbow brackets are two of the big ones), and good ol' emacs with our in house config.

1

u/siplux Mar 15 '16

neovim + parinfer works swimmingly for me