Adjust Ada snippets to styleguide
Test Neovim config on push / build (ubuntu-20.04) (push) Failing after 27s Details

This commit is contained in:
Yannick Reiß 2025-02-24 07:37:01 +01:00
parent cca29ca695
commit 886d434849
1 changed files with 19 additions and 19 deletions

View File

@ -36,15 +36,15 @@ def find_candidate(tabstop, search_type):
endglobal
snippet helloworld "Hello world example to test features" b
-- `!p snip.rv = fn`
-- Created on: `date`
-- Author(s): Yannick Reiss <yannick.reiss@nickr.eu>
-- Content: Hello world example
-- `!p snip.rv = fn`
-- Created on: `date`
-- Author(s): Yannick Reiss <yannick.reiss@nickr.eu>
-- Content: Hello world example
with Ada.Text_IO; use Ada.Text_IO;
-- @name ${1:`!p snip.rv = fn[0].upper() + fn[1:].split('.')[0]`}
-- @return
-- @description Function printing hello world.
-- @name ${1:`!p snip.rv = fn[0].upper() + fn[1:].split('.')[0]`}
-- @return
-- @description Function printing hello world.
procedure $1 is
begin
@ -53,16 +53,16 @@ end $1;$0
endsnippet
snippet docstring "Document String with most important information" b
-- `!p snip.rv = fn`
-- Created on: `date`
-- Author(s): ${1:Yannick Reiß}
-- Description: ${2:`!p snip.rv = fn.split('.')[0]`}
-- `!p snip.rv = fn`
-- Created on: `date`
-- Author(s): ${1:Yannick Reiß}
-- Description: ${2:`!p snip.rv = fn.split('.')[0]`}
$0
endsnippet
snippet procedure "insert procedure" b
-- @name $1
-- @return
-- @name $1
-- @return
`!p
snip.rv = ""
if t[2].startswith("l"):
@ -96,7 +96,7 @@ for variable in variables:
if not variable == "" and not variable.startswith("typ"):
variableless = variable.replace("\t", "").replace (" ", "")
snip.rv += f"-- @variable {variableless}\n"
`-- @description $4
`-- @description $4
procedure ${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 ")"` is
$3
begin
@ -105,8 +105,8 @@ end $1;$0
endsnippet
snippet function "insert function" b
-- @name $1
-- @return $3
-- @name $1
-- @return $3
`!p
snip.rv = ""
if t[2].startswith("l"):
@ -129,7 +129,7 @@ for parameter in parameters:
for parameter in parameter_list:
if not parameter == "" and not parameter.startswith("typ"):
parameterless = parameter.replace("\t", "")
snip.rv += f"-- @parameter {parameterless}\n"
snip.rv += f"-- @parameter {parameterless}\n"
``!p
snip.rv = ""
if t[4].startswith("l"):
@ -139,7 +139,7 @@ else:
for variable in variables:
if not variable == "" and not variable.startswith("typ") and not variable.startswith("--"):
variableless = variable.replace("\t", "").replace (" ", "")
snip.rv += f"-- @variable {variableless}\n"
snip.rv += f"-- @variable {variableless}\n"
` -- @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
$4
@ -178,7 +178,7 @@ project ${1:Default} is
for Main use ("${5:main.adb}");
for Languages use ("Ada");
end $1;
-- Create dir? (y/): ${6:no}`!p
-- Create dir? (y/): ${6:no}`!p
from os import system
if t[6] == "y":
system(f"mkdir -p {t[2]}")