Remove autoformat
This commit is contained in:
parent
9da04ad7e8
commit
8e09bfd6b7
|
@ -30,19 +30,3 @@ vim.api.nvim_create_autocmd({ "BufLeave" }, {
|
||||||
pattern = { "*.adb", "*.ads" },
|
pattern = { "*.adb", "*.ads" },
|
||||||
callback = leave_ada,
|
callback = leave_ada,
|
||||||
})
|
})
|
||||||
|
|
||||||
-- @name format_file
|
|
||||||
-- @param
|
|
||||||
-- @short Run gnatpp as formatter on the current file.
|
|
||||||
local function format_file()
|
|
||||||
vim.cmd("checktime %")
|
|
||||||
local write_cmd = "gnatpp " .. vim.api.nvim_buf_get_name(0)
|
|
||||||
os.execute(write_cmd)
|
|
||||||
vim.cmd("checktime %")
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Add formatter command
|
|
||||||
vim.api.nvim_create_autocmd({ "BufWritePost" }, {
|
|
||||||
pattern = { "*.adb", "*.ads" },
|
|
||||||
callback = format_file,
|
|
||||||
})
|
|
||||||
|
|
Loading…
Reference in New Issue