https://github.com/burgr033/mf-runner.nvim
code runner based off of Makefiles because it's the easiest and one of the most common formats.
https://github.com/burgr033/mf-runner.nvim
code-runner lua makefile neovim neovim-plugin nvim plugin
Last synced: 2 months ago
JSON representation
code runner based off of Makefiles because it's the easiest and one of the most common formats.
- Host: GitHub
- URL: https://github.com/burgr033/mf-runner.nvim
- Owner: burgr033
- License: mit
- Created: 2024-03-10T00:53:14.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-14T14:32:02.000Z (about 1 year ago)
- Last Synced: 2025-03-05T22:58:09.828Z (2 months ago)
- Topics: code-runner, lua, makefile, neovim, neovim-plugin, nvim, plugin
- Language: Lua
- Homepage:
- Size: 22.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
- License: LICENSE
Awesome Lists containing this project
README
# mf-runner.nvim
`mf-runner.nvim` is a simple and easy runner for makefiles.## Install
### Lazy
```lua
{
"burgr033/mf-runner.nvim",
cmd = { "MFROpen", "MFRRun", "MFREdit" },
dependencies = {
"folke/snacks.nvim",
},
opts = {},
},
```## Configuration
No configuration needed. You just need a Makefile in your current working directory.
## Commands
* `:MFROpen` - Opens a snacks picker for the targets in the detected Makefile
* `:MFRRun ` - Run a specific Makefile target. Supports tab completion for available targets
* `:MFREdit` - Edit the existing Makefile or create a new one if none exists## Mappings
If you use generic build targets, you could set up key mappings like:
```lua
vim.keymap.set('n', 'mb', ':MFRRun build', { desc = "Run Makefile build target" })
vim.keymap.set('n', 'mt', ':MFRRun test', { desc = "Run Makefile test target" })
vim.keymap.set('n', 'mc', ':MFRRun clean', { desc = "Run Makefile clean target" })
```## Features
- OS-independent path handling
- Recursive Makefile include parsing
- Intuitive UI with snacks.nvim integration
- Command output display in floating window
- Tab completion for Makefile targets## Motivation
I was looking through many different code-runner plugins which were either:
1. Too complicated for my use cases (overseer.nvim, compiler.nvim, etc.)
2. Not truly OS-independent (issues with path escaping)
3. Configured in the Neovim config rather than in the project itselfThis plugin aims to be a simple, lightweight solution that just works.