Skip to content

Latest commit

 

History

History
56 lines (38 loc) · 1.26 KB

README.md

File metadata and controls

56 lines (38 loc) · 1.26 KB

Outhouse.nvim

Streams subprocess output to a window buffer within the editor.

Preview

Installation

Using packer.nvim

use 'cyn1x/outhouse.nvim'

Using lazy.nvim

'outhouse.nvim'

Usage

Call handler.subprocess() to run an external program.

require('outhouse').setup{
    disabled = false,
    auto_start = false,
    vertical = true,
}

local handler = require('outhouse.handler')

vim.keymap.set("n", "<leader><leader>x", function()
    if vim.fn.has("win32") == 1 then
        handler.subprocess(vim.g.win32_build_filename)
    elseif vim.fn.has("unix") == 1 then
        handler.subprocess(vim.g.unix_build_filename)
    else
        error("Platform not supported", 2)
    end
end)

The example above assumes that the project root directory where nvim was started in contains an .init.lua file with global variables denoting the path of their corresponding build scripts. If the global variables do not exist or their paths are invalid, the program will prompt for a file path.

Contributing

Pull requests are welcome.

License

MIT