Compare commits
No commits in common. "cc1a7c93110d6350a00cfa444eb3fe921acd5b2a" and "f9ae3dfe99026f49f710c60b98901cfe2d947a13" have entirely different histories.
cc1a7c9311
...
f9ae3dfe99
|
@ -100,19 +100,7 @@ if t[2].startswith("l"):
|
||||||
parameters = []
|
parameters = []
|
||||||
else:
|
else:
|
||||||
parameters = t[2].replace("; ", ";").split(";");
|
parameters = t[2].replace("; ", ";").split(";");
|
||||||
parameter_list = []
|
|
||||||
for parameter in parameters:
|
for parameter in parameters:
|
||||||
if len(parameter.split(',')) == 1:
|
|
||||||
parameter_list.append(parameter)
|
|
||||||
else:
|
|
||||||
try:
|
|
||||||
list_type = parameter.split(':')[1]
|
|
||||||
except:
|
|
||||||
list_type = "???"
|
|
||||||
list_parameters = parameter.split(':')[0].replace(' ', '').split(',')
|
|
||||||
for sub_parameter in list_parameters:
|
|
||||||
parameter_list.append(f"{sub_parameter} : {list_type}")
|
|
||||||
for parameter in parameter_list:
|
|
||||||
if not parameter == "" and not parameter.startswith("typ"):
|
if not parameter == "" and not parameter.startswith("typ"):
|
||||||
parameterless = parameter.replace("\t", "")
|
parameterless = parameter.replace("\t", "")
|
||||||
snip.rv += f"-- @parameter {parameterless}\n"
|
snip.rv += f"-- @parameter {parameterless}\n"
|
||||||
|
@ -126,7 +114,7 @@ for variable in variables:
|
||||||
if not variable == "" and not variable.startswith("typ") and not variable.startswith("--"):
|
if not variable == "" and not variable.startswith("typ") and not variable.startswith("--"):
|
||||||
variableless = variable.replace("\t", "").replace (" ", "")
|
variableless = variable.replace("\t", "").replace (" ", "")
|
||||||
snip.rv += f"-- @variable {variableless}\n"
|
snip.rv += f"-- @variable {variableless}\n"
|
||||||
` -- @description $5
|
`-- @description $5
|
||||||
function ${1:`!p snip.rv = fn.split('.')[0].capitalize()`} `!p snip.rv = "" if t[2] == "" else "("`${2:N : Natural}`!p snip.rv = "" if t[2] == "" else ")"` return ${3:Natural} is
|
function ${1:`!p snip.rv = fn.split('.')[0].capitalize()`} `!p snip.rv = "" if t[2] == "" else "("`${2:N : Natural}`!p snip.rv = "" if t[2] == "" else ")"` return ${3:Natural} is
|
||||||
$4
|
$4
|
||||||
begin
|
begin
|
||||||
|
@ -171,9 +159,3 @@ if t[6] == "y":
|
||||||
system(f"mkdir -p {t[3]}")
|
system(f"mkdir -p {t[3]}")
|
||||||
system(f"mkdir -p {t[4]}")`
|
system(f"mkdir -p {t[4]}")`
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet package "Create package configuration" b
|
|
||||||
package ${1:body }${2:`!p snip.rv = fn.split('.')[0]`} is
|
|
||||||
$0
|
|
||||||
end $2;
|
|
||||||
endsnippet
|
|
||||||
|
|
|
@ -21,10 +21,3 @@ endsnippet
|
||||||
snippet -- "Add multiline comment" A
|
snippet -- "Add multiline comment" A
|
||||||
(* $1 *)$0
|
(* $1 *)$0
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet begin "Create Code Block" b
|
|
||||||
begin
|
|
||||||
$1
|
|
||||||
end;
|
|
||||||
$0
|
|
||||||
endsnippet
|
|
||||||
|
|
|
@ -1,27 +0,0 @@
|
||||||
-- Lua vim-dummy variable
|
|
||||||
if vim == nil then
|
|
||||||
local vim = {}
|
|
||||||
end
|
|
||||||
|
|
||||||
-- @name setup_ada
|
|
||||||
-- @param
|
|
||||||
-- @short Verify installation of ada tools or install them.
|
|
||||||
local function setup_ada()
|
|
||||||
vim.keymap.set("n", "<leader>cb", ":silent! gnatpp %<cr>")
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Setup and verify ada tools when opening a ada file
|
|
||||||
vim.api.nvim_create_autocmd({ "BufEnter" }, {
|
|
||||||
pattern = { "*.adb", "*.ads" },
|
|
||||||
callback = setup_ada,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- @name leave_ada
|
|
||||||
-- @param
|
|
||||||
-- @short Leave ada and reverse any changes to my editor defaults
|
|
||||||
local function leave_ada() end
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd({ "BufLeave" }, {
|
|
||||||
pattern = { "*.pas" },
|
|
||||||
callback = leave_ada,
|
|
||||||
})
|
|
|
@ -19,9 +19,6 @@ require("lspconfiguration")
|
||||||
-- Pascal mode (supported by plugins)
|
-- Pascal mode (supported by plugins)
|
||||||
require("pascal_mode")
|
require("pascal_mode")
|
||||||
|
|
||||||
-- Ada mode (supported by plugins)
|
|
||||||
require("ada_mode")
|
|
||||||
|
|
||||||
-- Misc configuration
|
-- Misc configuration
|
||||||
if vim == nil then
|
if vim == nil then
|
||||||
vim = {}
|
vim = {}
|
||||||
|
|
Loading…
Reference in New Issue