robin/laufey

git clone https://git.robinwobin.dev/robin/laufey

Justin M. Keyesfix(runtime)!: move "tohtml" to pack/dist/opt/ #3455759eadebe33

master
461 B12 linesraw
1if vim.g.loaded_2html_plugin ~= nil then
2  return
3end
4vim.g.loaded_2html_plugin = true
5
6vim.api.nvim_create_user_command('TOhtml', function(args)
7  local outfile = args.args ~= '' and args.args or vim.fn.tempname() .. '.html'
8  local html = require('tohtml').tohtml(0, { range = { args.line1, args.line2 } })
9  vim.fn.writefile(html, outfile)
10  vim.cmd.split(outfile)
11  vim.bo.filetype = 'html'
12end, { bar = true, nargs = '?', range = '%', complete = 'file' })