mirror of
				https://github.com/neovim/neovim.git
				synced 2025-11-04 01:34:25 +00: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:
		
				
					committed by
					
						
						Lewis Russell
					
				
			
			
				
	
			
			
			
						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 = '?' })
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user