Fork me on GitHub
#vim
<
2018-03-06
>
qqq17:03:41

Is there a channel here for clojure-neovim ? This is the only channel listed under "vim", but neovim feels offtopic here.

markwoodhall17:03:56

I think lots of people in this channel are using neovim, and there is definitely a lot of neovim discussion here.

seancorfield17:03:52

Given the topic says "all things (neo)vim" and the channel details agree, perhaps we should rename this channel to indicate a broader forum?

seancorfield17:03:27

@michaelblume created the channel -- any thoughts on a rename?

qqq17:03:50

I do not want to suggest changing channel description with my 2nd msg here, but this is what threw me off: https://imgur.com/a/KLYeo when I searched for "vim", this channel shows title: vim-firepalce description: Tom Pope's fireplace plugin It was not obvious to me how to infer neo-vim from the above.

jebberjeb17:03:51

Probably a good idea to change the channel name. This channel gets quite a bit of discussion about Vim & Neovim for Clojure dev in general, as well as just random Vim talk. It’s where people who use Vim or Neovim and also happen to program in Clojure come to talk about anything even marginally related 🙂

niclasnilsson17:03:31

About that, does fireplace work with Neovim?

dave17:03:38

i feel like this channel may as well be called #vim

seancorfield17:03:26

I can rename it, as an Admin, if y'all want?

jebberjeb17:03:12

#vim is fine w/ me

dave17:03:08

it's like your one-stop shop for discussing anything related to developing clojure in vim

dave17:03:10

or neovim

qqq17:03:39

how good is neovim's cloju4re scripting support ? can I use it instead of writing scripts in vimscript ?

jebberjeb17:03:11

@qqq Neovim has an RPC API you can write arbitrary programs against. https://github.com/clojure-vim/neovim-client is a client library for Clojure, for that API. It’s a bit heavyweight though. To use it to create a plugin, there’s still some plumbing you’ve got to do. I would say it’s not a good choice for lightweight scripting due to the learning curve.

seancorfield17:03:26

I can rename it, as an Admin, if y'all want?

dominicm17:03:44

I'd also vote for this to have a broader name.

qqq18:03:19

wow, I just got (api/command c ":echo 'Hello Neovim!'") from https://github.com/neovim/neovim/wiki/Installing-Neovim to work -- this is pretty amazing

jebberjeb18:03:00

@qqq it’s fun. That library could definitely be improved, but I think at least that it’s a good example of the type of REPL experience we’d want.

jebberjeb18:03:59

I’ve done some plugins with it, actually recently used it to build an external GUI for embedded Neovim. It worked fine. But I really wish it was easier to get in and make a simple plugin quickly.

dominicm18:03:41

I've been trying to think about how I would generate a manifest like other hosts do. Also about how I would load arbitrary libraries/plugins.

seancorfield18:03:27

Now we're just #vim (to match #emacs as a generic channel).

jebberjeb18:03:37

Yeah @dominicm it needs that level of integration. But I’m not familiar w/ how that side of it works.

dominicm18:03:28

Woohoo 🙌

qqq18:03:42

@seancorfield: thanks for all your admin work; I have no idea of all the work you do behind the scenes, but it seems every time admin work can make clojurians better, you're always there

seancorfield18:03:53

NP. Different admins cover different timezones. I'm West Coast US and I'm a night owl so I'm around pretty much all the time the European admins aren't 🙂

dominicm18:03:14

@seancorfield I'm curious, what summoned you here?

seancorfield18:03:07

@qqq asked in #clojure whether there was a general vim channel and I pointed them here, with a suggestion that maybe this channel's focus could be expanded... since I've seen quite a few folks ask about a general vim channel. I'll evaporate soon and no one will even remember I was here 🙂

zamaterian10:03:26

No please stay and adopt vim 😉

dominicm19:03:24

@jebberjeb I've been wondering if the solution is a jvm/java plugin loader, where class loaders are used for isolation. It would be very lightweight, and far easier to code in java. The other option is to (load-file) and make clj-embed/tools.deps.alpha available for bootstrapping any dependencies on-demand. Any thoughts on that?

dominicm19:03:11

The latter is the least code, but is definitely the slowest. Maybe it would be a good mvp.

qqq19:03:15

@jebberjeb: I'm looking at the diagram in https://github.com/jebberjeb/clojure-socketrepl.nvim Correct me if I'm wrong. There are two jvm processes right? One for running the real clojure repl, and one for running the *.jar. If so, why is there two repls instead of just one?

dominicm20:03:28

@qqq dependency conflicts 🙂

dominicm20:03:48

@qqq you don't want your vim plugin's version of core-async to mess with your application.

dominicm20:03:56

It also means you don't need to add a dependency to your project.

jebberjeb20:03:21

@qqq @dominicm That’s right. It’s definitely not the most efficient approach. But it keeps things isolated.

dominicm20:03:39

@jebberjeb I think it's a great solution.

dominicm20:03:11

I noticed that clj runs with -Xmx 128M or something, which isn't much, so clojure is quite happy with that.

jebberjeb20:03:42

@dominicm Yeah, I think using tools.deps.alpha for an MVP might be a good way to go. I know that building w/ Clojure got me farther faster, and it’d be nice to get some burn in time with it on a project like this.

qqq20:03:52

@jebberjeb @dominicm: With emacs, it is nice that I can write some elisp code, do a C-x C-e, and test it out. With this approach, where repl = jvm running my clj code editor = jvm running a jar is there a way to define a clojure function, test it out, and have it extend my editor ?

dominicm20:03:30

😁 PR welcome.

jebberjeb20:03:43

@dominicm I hadn’t, but that seems like a way around some of the dependency issues we’d face.

dominicm20:03:00

I think clj-embed has added a REPL or something, so it would be interesting to expose this somehow.

dominicm20:03:16

I'll have a go at a little hack this weekend perhaps. I think this would be quite fun.

jebberjeb20:03:18

With the current neovim-client, It wouldn’t be hard to bolt some Clojure code into your running plugin process at runtime. Off the top of my head, I’m not sure how you’d go about making it callable via Vimscript in such a dynamic way, but I’m sure it’s doable.

jebberjeb20:03:58

But I suppose the plugin could handle that — you could do that w/ Clojure, so it wouldn’t be too bad.

dominicm20:03:30

@jebberjeb I'm thinking a convenient command for opening a scratch buffer with some fireplace buffer-local variables set / nrepl connection scoped to it.

qqq20:03:12

This is going to sound silly: is it possible to have neovim, on every key stroke, instead of doing work, pass that keystroke to clojure? [then, I want to have clojure decide what to do with the keystroke / send comamnds back]

qqq20:03:37

This would lose access to all the nice vimscript libs, but would allow clojure, rather than vimscript, to have full control of neovim.

jebberjeb20:03:48

@dominicm can you hook in to every keystroke w/ Vimscript? Because if so you could dish them off to fireplace’s nrepl connection or neovim-client similarly.

dominicm20:03:15

I don't think so.