mini.nvim
mini.nvim copied to clipboard
mini.run: simple run configs manager in your editor
Contributing guidelines
- [X] I have read CONTRIBUTING.md
- [X] I have read CODE_OF_CONDUCT.md
Module(s)
mini.run
Description
One of the most basic features of most code editors or IDEs is running your code from the editor and getting back the errors. Yet, there aren't many popular or simple options to do this in neovim apart from overseer.nvim.
Features :
- Easily define run configs for specific languages
- For example you're working in rust : create a "Build", a "Run" config and a "Test" config
- Easily define run configs for specific projects
- Using a directory name matching or finding a specific file in the working dir, you can have a "Run Server" and "Run Client" config for your game
- Watch for interpreted languages runtime errors or crashes and log them to qflist dynamically
- So if your Node http server throws an exception you can quickly fix it
- Compile errors, runtime errors or interpreter errors are logged back to your quickfix list so you can easily code-compile-code
- You can configure an optional command to choose if an integrated terminal should be open (example: "30vsplit term" to open a vertical terminal)
Bonus:
- Composite configs? (run multiple configs at once)
- DAP integration? (use the same menu for custom run configs and dap debug configs)
I think this idea really fits into mini's philosophy of small, straightforward and simple plugins, and probably fills a void in the neovim plugin ecosystem. I am willing to try and make a PR for a MVP of that new module.
Thanks for the suggestion!
I think most of the features will be spread across 'mini.terminals' (like open terminal and run command/selection in terminal) and 'mini.quickfix'. Nevertheless, this is a useful and quite comprehensive set of features to use as reference, thanks!
Thanks for the quick reply. Just wanna add that mini is probably my favorite neovim plugin I love the philosophy and simplicity.
It's up to you in the end to choose where this feature fits! I've been looking towards solving this issue for my personal config and thought it might fit mini's philosophy.
The real killer features that are missing everywhere to me are :
- Easily specify custom run commands
- Per-project run commands
- Simple "press
" to run and menu to select what to run - Redirection to qflist (which can just be an option in mini.terminals)
Hope that helps, will happily make a PR if I can be of use
Even overseer.nvim has ~~significant~~ problems for more advanced things like
- storing and validating outputs, https://github.com/stevearc/overseer.nvim/issues/230
- ui issues around shortcuts for tasks https://github.com/stevearc/overseer.nvim/issues/225
- doing dependency logic as system runtime constrain of the runner
and overseer has lots of error-prone callback logic.
I'd argue dependency things belong into a build system describing how the test runner REPL should work and patching around this via configurations leads to arbitrary complexity.
From my point of view the only advantage without huge complexity would remain to be project local run steps to get them into quickfix and/or dynamic attaching of debugger and offer a programming API to get the log streamed by user specified function to a neovim buffer. Common per language things could thereafter be collected in a wiki for copy-pasting.