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

mini.run: simple run configs manager in your editor #1123

Open
2 tasks done
clorl opened this issue Aug 7, 2024 · 3 comments
Open
2 tasks done

mini.run: simple run configs manager in your editor #1123

clorl opened this issue Aug 7, 2024 · 3 comments
Labels
new-module Request for the new module

Comments

@clorl
Copy link

clorl commented Aug 7, 2024

Contributing guidelines

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.

@clorl clorl added the feature-request Request for a feature to existing module label Aug 7, 2024
@echasnovski
Copy link
Owner

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!

@clorl
Copy link
Author

clorl commented Aug 7, 2024

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

@matu3ba
Copy link

matu3ba commented Aug 13, 2024

Even overseer.nvim has significant problems for more advanced things like

  1. storing and validating outputs, idea: dynamic component to validate existing task behavior (reproduce and compare output and/or return status) stevearc/overseer.nvim#230
  2. ui issues around shortcuts for tasks idea: allowing harpoon-like configuration with commands referencing task id and swapping task ids stevearc/overseer.nvim#225
  3. 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.

@echasnovski echasnovski added new-module Request for the new module and removed feature-request Request for a feature to existing module labels Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-module Request for the new module
Projects
None yet
Development

No branches or pull requests

3 participants