1
0

indent with spaces for vue files

This commit is contained in:
Rokas Puzonas 2023-05-11 17:31:02 +03:00
parent c307f0c2ee
commit 6928c142ff

View File

@ -126,3 +126,15 @@ vim.api.nvim_create_autocmd("FileType", {
vim.api.nvim_buf_set_option(data.buf, "commentstring", "// %s")
end
})
-- Indent with spaces for vue files
vim.api.nvim_create_autocmd("FileType", {
group = vim.api.nvim_create_augroup("set-vue-expandtab", { clear = true }),
pattern = "vue",
callback = function(data)
vim.api.nvim_buf_set_option(data.buf, "expandtab", true)
vim.api.nvim_buf_set_option(data.buf, 'shiftwidth', 2)
vim.api.nvim_buf_set_option(data.buf, 'tabstop', 2)
vim.api.nvim_buf_set_option(data.buf, 'softtabstop', 2)
end
})