Skip to content

Select between two options when running code runner #136

Answered by CRAG666
Hudset asked this question in Q&A
Discussion options

You must be logged in to vote

Use coderunner select:
require('code_runner.hooks.ui').select({
Marp = function()
require('code_runner').run_from_fn(
'marp --theme-set $MARPT -w -p . &$end'
)
end,
Latex = function()
hook.run({
command = 'pandoc',
args = { '$fileName', '-o', '$tmpFile', '-t pdf' },
preview_cmd = preview_cmd,
})
end,
Beamer = function()
hook.run({
command = 'pandoc',
args = { '$fileName', '-o', '$tmpFile', '-t beamer' },
preview_cmd = preview_cmd,
})
end,
Eisvogel = function()
hook.run({
command = 'bash',
args = { './build.sh' },
preview_cmd = preview_cmd,
overwrite_output = '.',
})
end,
})
for example for markdown

Replies: 1 comment 1 reply

Comment options

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

Answer selected by Hudset
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