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:
Christian Clason 2024-02-28 18:01:38 +01:00 committed by Lewis Russell
parent aa62898ae3
commit 0246f1a897

View File

@ -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 = '?' })