Fork me on GitHub
#vim
<
2018-07-09
>
dave01:07:41

@dominicm i use https://github.com/kassio/neoterm which is neat. it wraps a bunch of repls, so think it's kind of similar to nvim-repl in that respect

dave01:07:02

i mostly use it for one-off commands though, instead of as a repl

dave01:07:27

just whenever i want to run a command and i don't feel like leaving vim 🙂

dominicm06:07:04

I wonder why Justin is working on an alternative with a subset of functionality

Hukka09:07:49

Blah. So many things require fireplace. Latest I'd like to try is vim-cljfmt. I guess I should just go for it (I've still been using Jeb's terminal setup combined with screen running on a different monitor)

dominicm09:07:18

@tomi.hukkalainen_slac don't use vim-cljfmt, it's built into fireplace via the gq mapping.

dominicm09:07:08

fireplace provides a lot of difficult functionality (bencode & connection selection), which is why plugins rely on it.

Hukka10:07:03

Hm, ok, didn't know fireplace has it. Though makes me wonder what's the point of making a plugin on top of fireplace replicating fireplace functionality...

Hukka10:07:18

In any case, if I want that, I still need fireplace 🙂

dominicm10:07:19

the gq functionality came very recently.

Hukka10:07:15

Ah, I see

Hukka10:07:15

I wonder if it actually connected to the same repl I have under screen...

Hukka10:07:29

It did. So while I now have two different ways to run code, which is a shame, at least they are not interfering and I can now choose whether to have the results of evaluating forms come back to the bottom of vim, or the the repl running on the other monitor.

Hukka10:07:11

Though I'm still envious at how nicely the emacs guys have the results with-in the buffer, right next to the forms

dominicm10:07:17

One day 🙂 There's a neovim request for that

dominicm10:07:30

It's technically possible now, in a horrible undocumented hack

Hukka10:07:04

Seems like they are not playing that well together. I'm getting errors with cqq. Something about the terminal I have open

Hukka10:07:51

@dominicm Ooh. Do you have search terms or a direct issue link? I'd subscribe to that

👍 4
dominicm10:07:08

I don't recall off the top of my head.

Hukka10:07:04

If I read the code correctly, fireplace added the code formatting two years ago 🙂

dominicm11:07:19

I don't think so, maybe I'm being daft though

dominicm12:07:08

I suspect the commit might be much older than the merge

dominicm12:07:13

or my memory is bad 😄

Hukka12:07:31

Hmh. Tried to get clj-refactor running, but can't resolve https://github.com/clojure-vim/clj-refactor.nvim/issues/29

Hukka12:07:52

Everything should be ok in the health check, but still nothing's an editor command

Hukka12:07:09

Ah, now! Thought that dein would handle loading plugins automatically, but it doesn't do remote plugins

dominicm12:07:41

The version of node-client was 100% a problem. clj-refactor.nvim depends on some major api changes.

hkupty12:07:29

Sorry for the shameless self-promotion, but I just finished a (very simple) vim plugin for helping share code information (essentially path + line number) as github/gitlab/opengrok urls: https://github.com/vigemus/pointer.nvim/

jebberjeb12:07:09

@ingvij thanks, been wanting that for a while

dominicm12:07:46

@tomi.hukkalainen_slac The registration doesn't work on the old version at all

dominicm12:07:53

@ingvij Like fugitive's :Gbrowse?

Hukka12:07:11

@dominicm My problem was just assuming too much and not following instructions

hkupty12:07:22

@dominicm Kinda.. But it allows you to display code for non github places, such as opengrok.. you can configure that per-project

hkupty12:07:17

you can also configure it to use custom, on-premise urls, in case you're company closes their stuff :face_with_rolling_eyes:

hkupty12:07:51

Fair enough, but configuring is better than installing plugins IMO..

dominicm12:07:03

https://github.com/tpope/vim-rhubarb/ has support for github enterprise (alternative urls)

dominicm12:07:12

(I'm not finding an opengrok one though)

hkupty13:07:22

Well, of course that implies one needs to use fugitive to get this feature.. I stopped using fugitive once I realized it was messing my tcd configuration, so I think this is still valid. 🙂

jebberjeb13:07:56

(and vim-rhubarb)

Hukka13:07:05

@dominicm Was the inline repl stuff I referred to in cider perhaps the language server support?

dominicm13:07:07

@ingvij how does fugitive change tcd? that's a neovim only feature.

dominicm13:07:18

@tomi.hukkalainen_slac I don't understand, sorry.

dominicm13:07:26

Oh, no, definitely not.

Hukka13:07:55

I don't really know how to call it, the ability to have repl results within the text buffer. But not actually being part of the text

Hukka13:07:26

So that evaluating a form would show as (+ 1 2) => 3

Hukka13:07:24

I followed that to an end of line annotations PR, and that to the language server 🙂

Hukka13:07:34

Didn't realise that was already it

dominicm13:07:22

I think that issue has become a little overloaded tbh.

dominicm13:07:06

How's this?

Hukka13:07:40

Yeah, that's the one I was looking at too

Hukka13:07:50

Hmh. I'll subscribe to all of them!

dominicm13:07:21

I think I spoke with bfredl about the hacky workaround, and he liked the idea.

Hukka13:07:05

Heh, and snoe has already made LSP based refactoring work https://github.com/snoe/clojure-lsp

Hukka13:07:25

But looking a bit deeper into it, I don't think the protocol allows for repl like functionality... Perhaps coming from compiled language communities, that simply isn't thought as useful, or perhaps even such a thing exists

hkupty13:07:59

@dominicm It changes cd, which takes precedence over tcd. If I have two projects open and use fugitive on both, soon both will be on the same cd.

dominicm13:07:02

LSP is extensible. It could be bolted on, I don't know if it's been done then.

dominicm13:07:10

@ingvij when does it do that?

dominicm13:07:31

fwiw, I imagine Gina doesn't do that. But I'm not sure.

dominicm13:07:10

oh gross, it uses cd to find the git dir

dominicm13:07:01

I suspect one of those is :Gcd

hkupty13:07:30

when it sets cd, it removes the tcd setting, so committing on two tabs removes both tcds and both tabs now share the same cd.

hkupty13:07:46

I opened several pull requests in the past to change that on other projects, but fugitive has cds scattered all around the codebase, so I decided not to use it. Sometimes I use vimagit, sometimes I use Gina, but I think I prefer using it straight from the cmd line... So I created the pointer.nvim so I could get the urls without needing to rely on fugitive 🙂 (tbh, I had forgotten about that, but still not enough to make me use it again)

dominicm14:07:45

:Gina browse exists too of course 😛

hkupty14:07:27

Sure, but then I'd need to mess with Gina to get the code on opengrok..

snoe15:07:04

@tomi.hukkalainen_slac: @pedrorgirardi was looking at integrating repl commands with clojure-lsp, the protocol has things like executeCommand that pretty much allows a language server to execute anything but I'm not sure how rich response like stacktrace results would work.

Hukka18:07:47

I've no idea how they work in cider either

Hukka18:07:59

Perhaps I should try (not sure if I'm serious...)

dominicm19:07:14

There's a stack parser. I've worked on it, quite a beast.