Remove unused lua snippets and add return statement to doxygen
Test Neovim config on push / build (ubuntu-20.04) (push) Failing after 30s
Details
Test Neovim config on push / build (ubuntu-20.04) (push) Failing after 30s
Details
This commit is contained in:
parent
6734c00e68
commit
566763638d
|
@ -1,64 +1,3 @@
|
||||||
snippet fun "New function"
|
|
||||||
-- @name $1
|
|
||||||
`!p
|
|
||||||
param = ""
|
|
||||||
for i in t[2].split(","):
|
|
||||||
param += f"-- @param {i.replace(' ', '')}\n"
|
|
||||||
snip.rv = param
|
|
||||||
`-- @short ${3:Description}
|
|
||||||
function ${1:Name} (${2:})
|
|
||||||
$4
|
|
||||||
end;
|
|
||||||
$0
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet while "while-loop"
|
|
||||||
while (${1:true})
|
|
||||||
do
|
|
||||||
$1
|
|
||||||
end;
|
|
||||||
$0
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet for "for loop"
|
|
||||||
for ${1:i = 0}, ${2:target}, ${3:1}
|
|
||||||
do
|
|
||||||
$4
|
|
||||||
end;
|
|
||||||
$0
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet repeat "repeat until loop"
|
|
||||||
repeat
|
|
||||||
$2
|
|
||||||
until (${1:Condition});
|
|
||||||
$0
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet ifthen "normal if clause"
|
|
||||||
if (${1:Condition})
|
|
||||||
then
|
|
||||||
$2
|
|
||||||
end;
|
|
||||||
$0
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet ifelse "if and else clause"
|
|
||||||
if (${1:Condition})
|
|
||||||
then
|
|
||||||
$1
|
|
||||||
else
|
|
||||||
$2
|
|
||||||
end;
|
|
||||||
$0
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet "= fun" "Assign a function" rA
|
|
||||||
= function(${1:Parameter})
|
|
||||||
$2
|
|
||||||
end;$0
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet docstring "Document string" b
|
snippet docstring "Document string" b
|
||||||
-- Filename: `!p snip.rv = fn`
|
-- Filename: `!p snip.rv = fn`
|
||||||
-- Author: ${1:Yannick Reiß}
|
-- Author: ${1:Yannick Reiß}
|
||||||
|
@ -66,3 +5,22 @@ snippet docstring "Document string" b
|
||||||
-- Description: ${3:Funny lua script}
|
-- Description: ${3:Funny lua script}
|
||||||
$0
|
$0
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
|
snippet fun "New function"
|
||||||
|
-- @name $2
|
||||||
|
`!p
|
||||||
|
lines = t[5].split('\n')
|
||||||
|
for line in lines:
|
||||||
|
if line.startswith("return"):
|
||||||
|
snip.rv = f"-- @return {line.replace('return', '').replace(' ', '')}\n"
|
||||||
|
``!p
|
||||||
|
param = ""
|
||||||
|
for i in t[3].split(","):
|
||||||
|
param += f"-- @param {i.replace(' ', '')}\n"
|
||||||
|
snip.rv = param
|
||||||
|
`-- @short ${4:Description}
|
||||||
|
${1:local }function ${2:Name} (${3:})
|
||||||
|
$5
|
||||||
|
end;
|
||||||
|
$0
|
||||||
|
endsnippet
|
||||||
|
|
Loading…
Reference in New Issue