Use 2-space indent for Ruby, HTML, XML files

This commit is contained in:
Josh Holtrop 2026-06-29 23:07:14 -04:00
parent dd484dd4ae
commit b58be03795

View File

@ -43,9 +43,14 @@ vim.api.nvim_create_autocmd({ "BufReadPost", "BufNewFile" }, {
if vim.bo.filetype ~= "make" then if vim.bo.filetype ~= "make" then
vim.opt_local.expandtab = true vim.opt_local.expandtab = true
end end
vim.opt_local.ts = 4 local ft = vim.bo.filetype
vim.opt_local.sw = 4 local indent = 4
vim.opt_local.sts = 4 if ft == "ruby" or ft == "html" or ft == "xml" then
indent = 2
end
vim.opt_local.ts = indent
vim.opt_local.sw = indent
vim.opt_local.sts = indent
vim.opt_local.cinoptions = ":0,g0" vim.opt_local.cinoptions = ":0,g0"
end) end)
end, end,