Skip to content

Latest commit

 

History

History
55 lines (43 loc) · 1.4 KB

File metadata and controls

55 lines (43 loc) · 1.4 KB

Quick Run

Set a command to run when you press the Quick Run key.

Lua Neovim

Use Case

You have that one command for building or running your project and want to have a keymap set, but you don't want to change your Neovim config or worry about different keymaps for different projects.

With Quick Run you set the command to run, then use the predefined keymap (default <F5>) to run it whenever you want.

Installation

Using lazy.nvim:

{ 'LiamFenneman/quick-run.nvim', opts = {} },

Using packer:

use 'LiamFenneman/quick-run.nvim'

Quick Configuration

require('quick-run').setup({})

Default Configuration

require('quick-run').setup({
    default_cmd = 'echo "Hello World"',
    mappings = {
        quick_run = '<F5>',
    },
    callbacks = {
        on_stdout = function(_, data, _)
            vim.api.nvim_out_write(table.concat(data, '\n'))
        end,
        on_stderr = function(_, data, _)
            vim.api.nvim_err_write(table.concat(data, '\n'))
        end,
        on_exit = function(_, data, _) end,
    },
})