forked from foxora/nix
made sure sql has the right indentation
This commit is contained in:
parent
0794ed7edd
commit
11b2fa00d2
1 changed files with 13 additions and 0 deletions
|
|
@ -7,6 +7,15 @@ vim.api.nvim_create_autocmd("FileType", {
|
||||||
end,
|
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", {
|
vim.api.nvim_create_autocmd("User", {
|
||||||
pattern = "TelescopePreviewerLoaded",
|
pattern = "TelescopePreviewerLoaded",
|
||||||
callback = function(args)
|
callback = function(args)
|
||||||
|
|
@ -15,6 +24,10 @@ vim.api.nvim_create_autocmd("User", {
|
||||||
vim.bo.shiftwidth = 2
|
vim.bo.shiftwidth = 2
|
||||||
vim.bo.tabstop = 2
|
vim.bo.tabstop = 2
|
||||||
vim.bo.expandtab = true
|
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
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue