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

Question - async make #4

Open
awoodx opened this issue Jun 15, 2024 · 1 comment
Open

Question - async make #4

awoodx opened this issue Jun 15, 2024 · 1 comment

Comments

@awoodx
Copy link

awoodx commented Jun 15, 2024

Hi, Thanks for the great plugin! I'm trying to use this plugin to run make asynchronously, but having issues with the configuration.
This is what I have so far:

Recipe_Make = function()
    local recipe = {
        cmd = vim.o.makeprg,
        key = "make",
        kind = "build",
        components = {
            qf = { auto_open = true},
        },
    }

    require "recipe".execute(recipe):focus()
end

The make command works but there's a few issues:

  • The terminal output window is at the top, and takes half screen. I would like it to be at the bottom and be able to configure the size. I tried passing TermConfig table, { type = 'smart', height = .25}, but didn't work. What other types beside smart are supported?
  • The quick fix window does not open. I have the qf.nvim plugin installed as well.
@ten3roberts
Copy link
Owner

Hi, thank you for the issue

function M.open_win(config, bufnr)

These are the supported terminal modes (smart, float, split, vsplit), but I should certainly add a bottom split variant.

The quickfix should also open if there are errors, though that depends on if the compiler is properly detected. Which command are you running inside make? If it isn't a C-like language you may need to specify the compiler manually, the syntax has slightly deviated from some parts of the README.

https://github.com/ten3roberts/recipe.nvim/blob/a2a2eece1846d54b1ef4e26ef23792e18a2c8a24/lua/recipe/components/qf.lua#L15C1-L22

These are the defaults, so you can try { open = true } rather than { auto_open = true }

{
	compiler = nil,
	throttle = 2000,
	max_lines = 2000,
	-- one of true|false|auto
	--
	-- If auto, open if there are errors
	open = "auto",
},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants