nvimdotfiles/after/plugin/lsp/lsp-gdscript.lua
2023-12-30 12:16:42 +01:00

13 lines
286 B
Lua

--require("lspconfig").gdscript.setup {}
vim.api.nvim_create_autocmd('BufWritePost',
{
pattern = '*.gd',
callback = function()
local file = vim.api.nvim_buf_get_name(0)
local job = vim.fn.jobstart({ "gdformat", file })
vim.fn.jobwait({ job })
vim.cmd(":e")
end,
})