nvimdotfiles/after/plugin/lsp/lsp-gdscript.lua

13 lines
286 B
Lua
Raw Normal View History

2023-12-30 11:16:42 +00:00
--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,
})