Update formatting

This commit is contained in:
mathijs-bakker
2025-09-08 09:06:30 +02:00
parent 821acda5ca
commit 0afa743018
2 changed files with 12 additions and 1 deletions

View File

@@ -10,3 +10,14 @@ vim.api.nvim_create_autocmd("FileType", {
vim.bo.smartindent = true
end,
})
-- Autoformat .gd files on save using gdformat
vim.api.nvim_create_autocmd("BufWritePost", {
pattern = "*.gd",
callback = function()
-- Run gdformat on the file
vim.cmd("silent !gdformat %")
-- Reload the buffer to reflect changes
vim.cmd("edit")
end,
})

View File

@@ -16,7 +16,7 @@ function M.setup(opts)
require("godotdev.start_editor_server")
require("godotdev.reconnect_lsp")
require("godotdev.force_spaces")
require("godotdev.formatting")
require("godotdev.dap").setup({
type = "server",