Use 2-space indent for Ruby, HTML, XML files
This commit is contained in:
parent
dd484dd4ae
commit
b58be03795
@ -43,9 +43,14 @@ vim.api.nvim_create_autocmd({ "BufReadPost", "BufNewFile" }, {
|
||||
if vim.bo.filetype ~= "make" then
|
||||
vim.opt_local.expandtab = true
|
||||
end
|
||||
vim.opt_local.ts = 4
|
||||
vim.opt_local.sw = 4
|
||||
vim.opt_local.sts = 4
|
||||
local ft = vim.bo.filetype
|
||||
local indent = 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"
|
||||
end)
|
||||
end,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user