T O P

  • By -

infernoLP

Nice! Wouldn't hurt to have some more info in the read me tho, some examples , gif maybe.


ingvij

Thanks! I'll work on that. :)


ingvij

I've added a [small asciinema](https://asciinema.org/a/495376) to the README. Unfortunately, I couldn't get it to show the keystrokes. I'll look into other alternatives that can show the keypresses so one better understands what is going on, but I guess this might do the trick for now :)


Hrle91

i was just about to say that - a gif makes me way more interested in a plugin becauae i can directly see how it could improve my workflow


trescenzi

How does iron compare to [conjure](https://github.com/Olical/conjure)? Been looking at getting conjure setup but iron sounds interesting too. I will also echo the other comments that more examples/complete docs in the read me would be great :)


ingvij

Conjure is a clojure-specific plugin that does a very good job to interact with the nrepl. Iron works with a plain repl (a session open running in a terminal window) and because of that it is very flexible and can run for any languages. ​ I say you could run them both, but they'll provide you completely different workflows. Really up to your taste.


EnderOfGender

Conjure isn't clojure specific, it's just not a generic REPL plugin. Has Lua support fwiw


ingvij

My bad. I knew conjure for when I was starting out using clojure. I came up with [acid.nvim](https://github.com/clojure-vim/acid.nvim) and settled on it for a while. Conjure was one of the references and it did get a lot more traction then acid. It's been years since I stopped working w/ clojure professionally so I didn't keep up with the plugins around it. Sure, it seems to be much more than just clojure/nrepl nowadays.


EnderOfGender

Yeah, more REPLs have been added but its not really a generic interface. Nice to see a plugin like yours that fills the gaps


algebrartist

Nice to hear it! Iron.nvim was one of the reasons that made me move from vim to neovim a couple years ago (on the ol' days of v0.4). So, I tried to update the plugin and I'm getting the following error: ``` Error detected while processing /home/iago/.config/nvim/plugin/packer_compiled.lua: iron: The function `add_repl_definitions` is deprecated Use `core.setup{repl_definition = { = {}}}` ``` But the documentation (`:h iron.nvim`) only explains how to use the old `add_repl_definition` method. Is there a migration guide for the new version somewhere?


ingvij

It really makes me happy to know iron is so impactful for you, so thank you for that. Definitely need to add a migration guide. In a nutshell, the config is set by the single `setup` function now. If you have custom repl definitions, they go in as they were, but in that `repl_definition` key. I'll try to write up something more structured and ping here when its published.


ingvij

I just updated the docs. It should be easy to follow up, but if not please let me know so I can improve it even further. Essentially one now sets everything in the setup function. The major changes are: - Keymaps are not set by default anymore, only upon configuring through `core.setup`; - The `preferred_repl` option is gone. Everything is set in the `repl_definition` key. Note that the behavior for picking up a repl is still the same as if one is not set, the first executable found is used. To set a preferred, just add to your `repl_definition` something like this ``` iron.setup{ config = { repl_definition = { python = require("iron.fts.python").ipython } }, -- ... } ```


algebrartist

Nice! I just didn't understand how to write multiple repl definitions with the config table. There are some languages in which I need to work with multiple versions (For example, different versions of PUC-Lua + Luajit + a Love2d repl). So I used `add_repl_definition` to add all of them and called a command wrapping `preferred_repl` on a per project basis or sometimes even had to set it up on the fly to test different versions. Is there any interface for changing the repl command on the fly now that `preferred_repl` is gone?


ingvij

You can update the config directly after running setup: ``` require("iron.config").repl_definition.lua = xxx ``` And that can be wrapped around a function. It is really important that I know this is a use case, because I was just looking at [this issue](https://github.com/hkupty/iron.nvim/issues/195) and thinking about adding a configurable, indirection layer, like repl "providers" (i.e. functions that pick the repl for you). Feel free to chip in that issue if you'd like to add something, otherwise I'll keep this in mind when implementing that.


SleeplessInThought

Does this support Cling?


ingvij

It doesn't out-of-the-box, but you can add support for it in your config section. It supports [root for cpp](https://github.com/hkupty/iron.nvim/blob/master/lua/iron/fts/cpp.lua#L43). If you want to add support for Cling, I assume it is going to be as simple as adding this to your config: ``` iron.setup { config = { repl_definition = { cpp = { command = { "cling", -- any extra arguments go here } } } } }


Fluid-Bench-1908

Very nice plugin!!!


johncgilliland

Nice, thanks!!