Skip to content

Commit 1279278

Browse files
committed
Set 4 space tabs default and override gdscript same
Not sure what was overriding .gd files in projects. There is a .godot hidden folder with .editor settings but could not find anything relevant to indents and vim specifically.
1 parent 72cbf1a commit 1279278

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

init.lua

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -922,5 +922,19 @@ require('lazy').setup({
922922
},
923923
})
924924

925+
vim.opt['tabstop'] = 4
926+
vim.opt['softtabstop'] = 4
927+
vim.opt['shiftwidth'] = 4
928+
vim.opt['expandtab'] = true
929+
930+
vim.api.nvim_create_autocmd('BufEnter', {
931+
pattern = '*.gd',
932+
callback = function()
933+
vim.bo.tabstop = 4
934+
vim.bo.softtabstop = 4
935+
vim.bo.shiftwidth = 4
936+
vim.bo.expandtab = true
937+
end,
938+
})
925939
-- The line beneath this is called `modeline`. See `:help modeline`
926940
-- vim: ts=2 sts=2 sw=2 et

0 commit comments

Comments
 (0)