Fork me on GitHub
#vim
<
2017-04-21
>
dominicm08:04:17

Anybody feeling brave and want to test my ALE/eastwood/kibit integration? It should be really easy now

dominicm09:04:56

Really want some feedback, to make sure it does more than "it works for me"

dominicm09:04:37

Good ways to check if it works: (is (= 1)) ← Eastwood (= 5 (+ 1 4)) ← Kibit will tell you to use inc

mikepjb10:04:25

hmm in go lang

mikepjb10:04:56

would love to have a look later on, unusually busy for a friday right now

dominicm10:04:25

the golang is to make it completely irrelevant for you. https://github.com/SevereOverfl0w/clojure-check/releases here is an opaque binary. it just works™

dominicm10:04:54

There's no "please install ruby & this gem"

devth14:04:03

i've been using Neomake. haven't tried ALE. worth switching? 🙂

dominicm14:04:16

@devth it was designed from the ground up for linking instead of an async replacement for :make. It's way better.

dominicm14:04:50

I really like it. I'm happy to add support for Neomake directly into the repo.

devth14:04:03

cool. i'll try it out, along with clojure-check

devth14:04:25

might be next week though. heading out of town today

dominicm14:04:50

I'm very grateful 🙂. Just want some user testing & feedback before I "release" it.

devth14:04:03

absolutely 🙂

markwoodhall20:04:35

Hi everyone, it has been a while since I logged in here. I've been working on this and wanted to get some initial feedback on the idea. It's not even near ready yet but am interested in any input. http://i.imgur.com/FE6OwDp.gif

jebberjeb20:04:25

@markwoodhall neat. I feel like I saw something like this with atom recently?

jebberjeb20:04:45

cool to see it with Vim

markwoodhall20:04:02

Not sure, It is based somewhat on LightTable.

dominicm20:04:41

@markwoodhall that's amazing. I want it.

dominicm20:04:44

How does it work?

jebberjeb20:04:49

yeah I'd use that

dominicm20:04:50

@jebberjeb I think atom does it better, because it limits the print, and you can click around to explore the data structure & expand it.

jebberjeb20:04:07

oh right, I saw that yeah

dominicm20:04:58

Something interesting unrepl does it create a reader and limit all print levels, so you get sequences like: (1 2 3 4 5 <#C4C63FWP5|unrepl>/... {:get (tmp1234/get :G_128)}) and you can send (tmp1234/get :G_128) to the repl to get the rest (recursively)

dominicm20:04:22

I'd love to see an easymotion-style mapping for expanding particular ones in a vim wrapper for unrepl

markwoodhall20:04:13

@dominicm started off working on it for the Mono C# Repl (https://twitter.com/markwoodhall/status/855445754206461952/photo/1), to use for the day job, but soon realised it would work nicely for Clojure. It works by trying to figure what expressions are in the current selection/line/file and evaling them with fireplace. It then iterates over all of the responses and appends them to the line at the end of the expression. When you leave the buffer or write to it the inline comments are cleaned up. There will be a lot of scenarios it doesn't work properly for right now. The video shows the plugin running in "Inline" mode, it can also run in "lastline" mode, where it will only show the inline comment for the last line in the selection/file/line, this is much more reliable, since it not trying to match repl output to expressions in the buffer. It also has a "bottom" mode, which will append new lines under the selection, which is rubbish.

dominicm20:04:05

@markwoodhall so it writes to the current buffer to make it work?

markwoodhall20:04:25

Yeah, it's best used in an Instarepl style buffer, where changes to the buffer are less of an issue.

dominicm20:04:45

Could the conceal feature be used for this?

markwoodhall20:04:00

I'm not sure, it sounds like it might be a good fit though.

dominicm20:04:40

Have you seen codi (does something similar)

dominicm20:04:50

Might be a safer approach

markwoodhall20:04:48

Cool, hadn't seen that before.

dominicm20:04:09

But yeah, really love this ❤️

devth20:04:30

that looks amazing

markwoodhall20:04:05

I guess I was worried about the same kind of things as you, I figured people using filewatchers and stuff for auto testing wouldn't have many issues because it never writes the buffer. The biggest issue I could see was messing with the undu history, which I think is fixable. Again, in a buffer specific for a repl, most of these things don't matter.

dominicm20:04:10

You're probably right actually 🙂

dominicm20:04:19

if you're not writing the buffer

dominicm20:04:45

or is there a case where the text could get left over? I think vim-easymotion used to have that problem (or does?). But it doesn't really break.

dominicm20:04:52

Check out how easymotion works 😛

markwoodhall20:04:15

Will do, I think the only scenario it can get left over is a vim crash, otherwise the output should be cleared when you write/quit/move away from the buffer. I ended up making it harder for myself by getting greedy and adding support for other languages/repls, like F# https://twitter.com/markwoodhall/status/854775581266804739, node/C#/and a really dodgy vimscript eval https://twitter.com/markwoodhall/status/854373947974053888

dominicm20:04:36

That's crazy 😛

dominicm20:04:39

I was about to suggest "a generic backend agnostic UI layer for clojure" But you've gone the other direction

dominicm21:04:03

a super generic ui backend for interacting with evaluation contexts

dominicm21:04:29

:s/other direction/even further/g

markwoodhall21:04:11

The worst thing is, I started just trying to make it easier to work with C#, which doesn't really have a very good repl at all, so it was really painful. Now I've just gone off on one.

dominicm22:04:16

So, more I think about it. I think in ~1 year, I won't be using the nrepl anymore. 🎤 drop.

jebberjeb22:04:35

I need a burns rubbing hands eagerly emoji

jebberjeb22:04:34

eh, no "eeeexcellent" emjoi, too bad 🙂

dominicm22:04:39

needs a gif

jebberjeb22:04:43

Seriously though, how come?

jebberjeb22:04:51

hrm, you were serious about the 🎤 drop.

dominicm22:04:55

Language Server Protocol.

dominicm23:04:26

Playing with neomake. ALE is better. It does realtime (as you type) linting. Highly recommend.