Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nice plugin :-) #19

Open
michaelb opened this issue Feb 22, 2022 · 11 comments
Open

nice plugin :-) #19

michaelb opened this issue Feb 22, 2022 · 11 comments

Comments

@michaelb
Copy link

Hi, i'm here kinda on technological watch as sniprun's developper and I found you through the similar interactions an user (z0xyz) had on both our repos. Since you had that mention on your readme about not having found suitable projects then, I wondered if that was just a matter of timing (sniprun wasn't half as good/popular in feb 2021) or if it didn't make the cut for some other reason.

Also, looks like we both were jealous of VSCode's code runner and decided to create our own plugin ahah ! Your approach is very similar to the original thing though !
We don't do exactly the same thing, but feel free to steal features take inspiration from sniprun and I won't hesitate to do the same.

Code-writingly yours,
Michael

@CRAG666
Copy link
Owner

CRAG666 commented Feb 23, 2022

@michaelb I'll take your word for it. This plugin doesn't go the way of yours, it goes by the KISS principle, I want to keep it as simple as possible without adding too many configuration options or complexity in the code. But I have one word for your plugin "It's absolutely amazing" and yes I discovered it not long ago and believe me it blew my mind, I currently use my own plugin and the reason is just that I integrate it with harpoon. On the other hand I would like you to try this plugin and I will try yours and we can give each other feedback.

By the way, I started this idea in August 2020 but in another repository which is not as successful as this one. I completely wrote all the logic in python, then I created a new repository with a catchier name, initially I created the plugin in python and lua, then I realized that "pure lua" was popular and decided to write everything in that language and this is the result. What you see is the result of this work and who knows maybe in the future someone will complain about the performance of lua and write it in C. I leave the repository below if you want to take a look at it and maybe you want to be a contributor of that command line tool:

https://github.com/CRAG666/crlvc

@michaelb
Copy link
Author

I would like you to try this plugin

I'll give it a shot one of those days

@michaelb
Copy link
Author

michaelb commented Mar 4, 2022

So far, not so good...

I haven't been able to make this work in under 15min, which is a lot, by my standards; my main pain points are:

  • I'm not exactly on Neovim 0.5 (but 0.6.1), which makes me wonder whether my issues are due to this. If you support from 0.5, it could be a little bit clearer
  • No defaults ? I'd expected not having to come up with the commands myself
  • The example setup isn't 100% working, python on my machine doesn't know about a -U option...

@CRAG666
Copy link
Owner

CRAG666 commented Mar 20, 2022

@michaelb python -U is deprecated in python 3 use python -u instead

@CRAG666
Copy link
Owner

CRAG666 commented Mar 20, 2022

The reason for not having default values ​​is so as not to saturate the load of the plugin (which in itself does not consume much) to only have what you actually use. something more handmade

@CRAG666
Copy link
Owner

CRAG666 commented Mar 20, 2022

As for the version, if it supports version 6, in fact there is already a branch for version 7, it is an error in the README that I will solve right now.

@michaelb
Copy link
Author

it is an error in the README that I will solve right now.

you can probably expect people to use python3, and update your example with "python -u" . Also some typos (ExapleDeno/ExapleCpp) and general phrasing, and the quick start guide doesn't work:

if I require('code_runner').setup({}) in my neovim configuration, I get:

E5108: Error executing lua ...acker/start/code_runner.nvim/lua/code_runner/options.lua:18: attempt to index field 'term'
 (a nil value)                                                                                                          
stack traceback:                                                                                                        
        ...acker/start/code_runner.nvim/lua/code_runner/options.lua:18: in function 'set'                               
        ...e/pack/packer/start/code_runner.nvim/lua/code_runner.lua:7: in function 'setup'                              
        [string ":lua"]:1: in main chunk        

which is quite problematic, given your readme is quite long and it takes times for newcomers to grasp where is what information.

The reason for not having default values ​​is so as not to saturate the load of the plugin (which in itself does not consume much) to only have what you actually use. something more handmade

Imo, this argument is not valid; having 5-10 more lines of Lua won't ever, ever make a >0.1ms difference on your startup time, and while you should let users customize their build&run one-liners to suit their non-standard files/projects/stuff, most of the time there is one sensible way to do thing, that the users shouldn't have to be bothered with.

I've noticed some minor bugs, such as the terminal including line numbers (which is not super useful and takes up precious space), and the focus being switched to the output split (in the terminal), which may be intended, but is (at least for me) more a pain than a gain

@CRAG666
Copy link
Owner

CRAG666 commented May 1, 2022

@michaelb check the new version

@krishnakumarg1984
Copy link

@michaelb The new version of code_runner is pretty awesome. Congratulations @CRAG666 for the updates that made it highly usable.

Also, it would be nice if both the authors can check-out iron.nvim. It would be nice to have a three-way comparison so that the community can make an informed decision about which one to adopt for their individual workflows.

Look at this example of how two related neovim plugin authors came together to discuss and provide comparison/benchmarks. While one plugin inspired the second, the unique features of the second are now starting to be back-ported with a different algorithmic approach. In short, everyone benefits and it is a stimulating experience.

The community is richer thanks to you, the developers!

@michaelb
Copy link
Author

michaelb commented May 21, 2022

I'm back :-)

code_runner is indeed way more polished than it was a few months ago, and for me it reached the point of "it just work, it's neat".
The last two (minor) friction points for me are:

  • one of the 'setup' snippet doesn't work if we paste it as-is. Maybe there's another way to inform the user of the showcased configuration options....
  • After a 'RunCode', the focus is switched to the opened terminal, and I have to switch back (Ctrl-w-w) to get back to whatever I was typing. For other "display mode", the annoyance is more or less pronunced (tab get closed/hidden by anew 'RunCode', float is more temporary anyway so it's okay

Great job!

@krishnakumarg1984 comparing the three is a good idea I think, I'm still short on time though...

@CRAG666
Copy link
Owner

CRAG666 commented Jan 14, 2023

@krishnakumarg1984 Could you help us with the task of comparing the three plugins?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants