Skip to content

LiamFenneman/quick-run.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

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,
    },
})

About

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

Resources

Stars

Watchers

Forks

Languages