made sure sql has the right indentation

This commit is contained in:
foxora 2026-03-31 18:05:37 +01:00
parent 0794ed7edd
commit 11b2fa00d2

View file

@ -7,6 +7,15 @@ vim.api.nvim_create_autocmd("FileType", {
end,
})
vim.api.nvim_create_autocmd("FileType", {
pattern = { "sql" },
callback = function()
vim.opt_local.shiftwidth = 4
vim.opt_local.tabstop = 4
vim.opt_local.expandtab = true
end,
})
vim.api.nvim_create_autocmd("User", {
pattern = "TelescopePreviewerLoaded",
callback = function(args)
@ -15,6 +24,10 @@ vim.api.nvim_create_autocmd("User", {
vim.bo.shiftwidth = 2
vim.bo.tabstop = 2
vim.bo.expandtab = true
elseif vim.tbl_contains({ "sql" }, ft) then
vim.bo.shiftwidth = 4
vim.bo.tabstop = 4
vim.bo.expandtab = true
end
end,
})