Fork me on GitHub
#editors
<
2016-12-05
>
dominicm08:12:51

In my understanding, that's how CIDER works. It runs in your repl, but instead of connecting to a web server from your browser, you connect to the nrepl from emacs

bcbradley08:12:29

@dominicm I think CIDER and nightlight are different. Nightlight's approach is to make the ide a dependency of your code. In other words, you have to open up some kind of basic text editor so you can set nightlight as a literal dependency of your project. Then when you run your project, nightlight steals the process and gives you an IDE. It literally runs inside the process.

dominicm09:12:12

@bcbradley CIDER is a dependency, in your profile.clj. When you run your repl, it jumps in and provides a IDE api. I'm not sure it's a good idea for a project to include nightlight by default, I'd be inclined to put it in my profile file.

benedek09:12:19

to be more precise @bcbradley and @dominicm the backend for cider is a dependency (called cider-nrepl) which is implemented as an nrepl middleware. there is an emacs lisp part of cider as well, even possible that some functionality is available in cider without the middleware and repl running. that’s said in cider we eventually decided to inject the cider dependencies using the command line options to add deps in both leiningen and boot

benedek09:12:43

so you only need add cider deps to your profile.clj or project file if you plan to start up a repl process and then connect to it with cider. if you jack in, so cider controls the repl process therefore can inject deps you don’t need to do that anymore

dominicm09:12:57

As a vim user, I do not use that feature. 😛 It would be too magic for me.

benedek10:12:06

fair enough… is not there a fireplace related plugin (sorry if use the wrong vim lingo) which gives you embedded repl?

benedek10:12:29

feature would make sense there

dominicm10:12:41

@benedek not sure if you know of https://github.com/clojure-vim/clj-refactor.nvim it takes advantage of the editor agnostic API you guys designed, and it allows my life to be much better because of it. Thought it might show what this tiny foresight allows.

benedek10:12:17

yup i am aware might have even starred it on github 😉

benedek10:12:51

really happy it happened too 🙂

dominicm10:12:11

There isn't. For two reasons: - in plain vim, it's technically difficult due to lack of great async (though this may change) - vim doesn't have a way to display terminal ops inside a buffer afaik There's also a social problem: Vim users hate magic. I don't think auto injection would be appreciated. Vim isn't an IDE, an OS or a terminal multiplexer. It's an editor. Also, vim tends to be an editor you kill often as part of a workflow, so having applications inside it turns out badly.

benedek10:12:34

fair. i guess slight differences between emacs and vim view of the world 😉

dominicm10:12:56

It very much is! I think my favourite example is this: Emacs 25 will ship with an embedded copy of webkit, presumably for things like markdown preview. Vim was embedded inside electron to achieve a similar thing: https://github.com/rhysd/NyaoVim

dominicm10:12:30

I feel like the approach is inverted, which isn't bad, just a different means to the same goal. Not entirely incompatible either.

benedek10:12:14

well emacs is a bit chaotic, messy I guess.. I love that chaos tho obviously 😉

dominicm14:12:28

@benedek also way more "kitchen sink" Everything is a plugin in vim. Usually several. And you've often got to stick them together (or use another plugin which has...). It's another form of chaos!

benedek14:12:10

haha, i prefer these to any IDE tho

dominicm14:12:10

Absolutely!