Skip to content

Can't run marp with neovim jobstart or with plenary.job #562

Answered by TylerLaBree
TylerLaBree asked this question in Q&A
Discussion options

You must be logged in to vote

--no-stdin is exactly the thing I needed. Thanks so much for the help! Here's the state of my function after fixing it up.

function M.compile_with_marp()
    local current_dir = vim.fn.expand("%:p:h")
    local file_base = vim.fn.expand("%:t:r")
    local md_file = current_dir .. "/" .. file_base .. ".md"
    local pdf_file = current_dir .. "/" .. file_base .. ".pdf"
    local Job = require'plenary.job'
    Job:new({
        command = 'marp',
        args = {
            '--no-stdin',
            '--config', '/home/tyler/.config/marp/config.yml',
            '-o', pdf_file,
            '--', md_file,
        },
    }):start()
end

And in my config file,

allowLocalFiles: true
pdf: true
the…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@TylerLaBree
Comment options

Answer selected by TylerLaBree
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants