mirror of
https://github.com/neovim/neovim.git
synced 2024-09-17 20:58:20 -04:00
fix(tohtml): set filetype of generated HTML to html
Problem: `:TOhtml` opens the generated HTML code in a split, meaning it inherits the `help` filetype if a help buffer is to be converted. Solution: Explicitly set the filetype to `html`.
This commit is contained in:
parent
aa62898ae3
commit
0246f1a897
@ -8,4 +8,5 @@ vim.api.nvim_create_user_command('TOhtml', function(args)
|
||||
local html = require('tohtml').tohtml()
|
||||
vim.fn.writefile(html, outfile)
|
||||
vim.cmd.split(outfile)
|
||||
vim.bo.filetype = 'html'
|
||||
end, { bar = true, nargs = '?' })
|
||||
|
Loading…
Reference in New Issue
Block a user