Add function to prove ada/Spark code
Test Neovim config on push / build (ubuntu-20.04) (push) Waiting to run
Details
Test Neovim config on push / build (ubuntu-20.04) (push) Waiting to run
Details
This commit is contained in:
parent
d79f1fd6d4
commit
41ec16380b
|
@ -52,3 +52,17 @@ endsnippet
|
||||||
snippet ,m "Math equation" A
|
snippet ,m "Math equation" A
|
||||||
\$$1\$ $0
|
\$$1\$ $0
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
|
snippet bookshelf "Tagline for bookshelf" b
|
||||||
|
`!p
|
||||||
|
if t[1] != "":
|
||||||
|
snip.rv = "[CW: "
|
||||||
|
else:
|
||||||
|
snip.rv = ""`$1`!p
|
||||||
|
if t[1] != "":
|
||||||
|
snip.rv = "]"
|
||||||
|
else:
|
||||||
|
snip.rv = ""`
|
||||||
|
${2:Title} by ${3:Author}
|
||||||
|
${4:Description}
|
||||||
|
endsnippet
|
||||||
|
|
|
@ -3,11 +3,22 @@ if vim == nil then
|
||||||
local vim = {}
|
local vim = {}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- @name Prove
|
||||||
|
-- @param
|
||||||
|
-- @short Run gnatprove
|
||||||
|
function Prove()
|
||||||
|
vim.cmd("new")
|
||||||
|
local run_cmd = { "alr gnatprove" }
|
||||||
|
vim.api.nvim_buf_set_lines(0, 0, -1, false, run_cmd)
|
||||||
|
vim.cmd(":%!bash")
|
||||||
|
end
|
||||||
|
|
||||||
-- @name setup_ada
|
-- @name setup_ada
|
||||||
-- @param
|
-- @param
|
||||||
-- @short Verify installation of ada tools or install them.
|
-- @short Verify installation of ada tools or install them.
|
||||||
local function setup_ada()
|
local function setup_ada()
|
||||||
vim.keymap.set("n", "<leader>cb", ":!gnatpp %<cr>")
|
vim.keymap.set("n", "<leader>cb", ":!gnatpp %<cr>")
|
||||||
|
vim.keymap.set("n", "<leader>pp", ":lua Prove()<cr>")
|
||||||
vim.opt.tabstop = 3
|
vim.opt.tabstop = 3
|
||||||
vim.opt.shiftwidth = 3
|
vim.opt.shiftwidth = 3
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue