mirror of
https://github.com/neovim/neovim.git
synced 2026-05-02 03:55:00 +00:00
feat!: rewrite TOhtml in lua
Co-authored-by: wookayin <wookayin@gmail.com> Co-authored-by: clason <c.clason@uni-graz.at> Co-authored-by: Lewis Russell <me@lewisr.dev>
This commit is contained in:
11
runtime/plugin/tohtml.lua
Normal file
11
runtime/plugin/tohtml.lua
Normal file
@@ -0,0 +1,11 @@
|
||||
if vim.g.loaded_2html_plugin ~= nil then
|
||||
return
|
||||
end
|
||||
vim.g.loaded_2html_plugin = true
|
||||
|
||||
vim.api.nvim_create_user_command('TOhtml', function(args)
|
||||
local outfile = args.args ~= '' and args.args or vim.fn.tempname() .. '.html'
|
||||
local html = require('tohtml').tohtml()
|
||||
vim.fn.writefile(html, outfile)
|
||||
vim.cmd.split(outfile)
|
||||
end, { bar = true, nargs = '?' })
|
||||
Reference in New Issue
Block a user