nvimdotfiles/after/plugin/lsp/lsp-gdscript.lua
2024-01-16 16:33:32 +01:00

13 lines
284 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,
})