try not to format html code for convenience

This commit is contained in:
Baipyrus 2024-11-26 09:53:13 +01:00
parent 21206df7b3
commit db9168e2d1

View File

@ -19,7 +19,7 @@ return {
-- Disable "format_on_save lsp_fallback" for languages that don't -- Disable "format_on_save lsp_fallback" for languages that don't
-- have a well standardized coding style. You can add additional -- have a well standardized coding style. You can add additional
-- languages here or re-enable it for the disabled ones. -- languages here or re-enable it for the disabled ones.
local disable_filetypes = { c = true, cpp = true, php = true } local disable_filetypes = { c = true, cpp = true, php = true, html = true }
local lsp_format_opt local lsp_format_opt
if disable_filetypes[vim.bo[bufnr].filetype] then if disable_filetypes[vim.bo[bufnr].filetype] then
lsp_format_opt = 'never' lsp_format_opt = 'never'