From f1eabbaa1b4ff1836d0ee8335b31d009203f3775 Mon Sep 17 00:00:00 2001 From: "Vito G. Graffagnino" Date: Tue, 30 Aug 2022 16:06:22 +0100 Subject: fixed zathura integration with texlab using nvim-texlabconfig --- luasnip_snippets/cs.json | 206 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 206 insertions(+) create mode 100644 luasnip_snippets/cs.json (limited to 'luasnip_snippets/cs.json') diff --git a/luasnip_snippets/cs.json b/luasnip_snippets/cs.json new file mode 100644 index 0000000..17623a9 --- /dev/null +++ b/luasnip_snippets/cs.json @@ -0,0 +1,206 @@ +{ + "enum": { + "prefix": "enum", + "description": "enumeration", + "body": "enum ${1:MyEnum} { ${2:Item} \\};" + }, + "sim": { + "prefix": "sim", + "description": "static int main", + "body": [ + "static int Main(string[] args)", + "{", + "\t$0", + "\\}" + ] + }, + "svm": { + "prefix": "svm", + "description": "static void main", + "body": [ + "static void Main(string[] args)", + "{", + "\t$0", + "\\}" + ] + }, + "prop": { + "prefix": "prop", + "description": "Simple property declaration", + "body": "public ${1:int} ${2:MyProperty} { get; set; \\}" + }, + "propfull": { + "prefix": "propfull", + "description": "Full property declaration", + "body": [ + "private ${1:int} ${2:_myProperty};", + "", + "public $1 ${3:MyProperty}", + "{", + "\tget { return $2; \\}", + "\tset { $2 = value; \\}", + "\\}" + ] + }, + "propg": { + "prefix": "propg", + "description": "Property with a private setter", + "body": "public ${1:int} ${2:MyProperty} { get; private set; \\}" + }, + "elif": { + "prefix": "elif", + "description": "else if", + "body": [ + "else if ($1)", + "{", + "\t$0", + "\\}" + ] + }, + "elseif": { + "prefix": "elseif", + "description": "else if", + "body": [ + "else if ($1)", + "{", + "\t$0", + "\\}" + ] + }, + "switch": { + "prefix": "switch", + "description": "switch statement", + "body": [ + "switch (${1:statement})", + "{", + "\tcase ${2:value}:", + "\t\tbreak;", + "", + "\tdefault:", + "\t\t$0break;", + "\\}" + ] + }, + "case": { + "prefix": "case", + "description": "case", + "body": [ + "case ${1:value}:", + "\t$2", + "\tbreak;" + ] + }, + "throw": { + "prefix": "throw", + "description": "throw", + "body": "throw new $1Exception(\"$2\");" + }, + "from": { + "prefix": "from", + "description": "LINQ syntax", + "body": [ + "var ${1:seq} =", + "\tfrom ${2:item1} in ${3:items1}", + "\tjoin ${4:item2} in ${5:items2} on $2.${6:prop1} equals $4.${7:prop2}", + "\tselect ${8:$2.prop3}", + "\twhere ${9:clause}" + ] + }, + "da": { + "prefix": "da", + "description": "Debug.Assert", + "body": "Debug.Assert(${1:true});" + }, + "cw": { + "prefix": "cw", + "description": "Console.WriteLine", + "body": "Console.WriteLine(\"$1\");" + }, + "cr": { + "prefix": "cr", + "description": "Console.ReadLine", + "body": "Console.ReadLine();" + }, + "mbox": { + "prefix": "mbox", + "description": "Message box", + "body": "MessageBox.Show(\"${1:message}\");" + }, + "equals": { + "prefix": "equals", + "description": "Equality for a type", + "body": [ + "public override bool Equals(object obj) => Equals(obj as ${1:TYPE});", + "", + "public bool Equals($1 other) // IEquatable<$1>", + "{", + "\tif (object.ReferenceEquals(other, null))", + "\t\treturn false;", + "\tif (object.ReferenceEquals(this, other))", + "\t\treturn true;", + "\tif (this.GetType() != other.GetType())", + "\t\treturn false;", + "\t$0", + "\treturn base.Equals(other);", + "\\}", + "", + "public override int GetHashCode() => base.GetHashCode();", + "", + "public static bool operator ==($1 x, $1 y) =>", + "\t(object.ReferenceEquals(x, null) && object.ReferenceEquals(y, null))", + "\t|| (!object.ReferenceEquals(x, null) && x.Equals(y));", + "", + "public static bool operator !=($1 x, $1 y) => !(x == y);", + "" + ] + }, + "mth": { + "prefix": "mth", + "description": "Method", + "body": [ + "${1:public} ${2:void} ${3:MyMethod}($4)", + "{", + "\t$0", + "\\}" + ] + }, + "mths": { + "prefix": "mths", + "description": "Static method", + "body": [ + "${1:public} static ${2:void} ${3:MyMethod}($4)", + "{", + "\t$0", + "\\}" + ] + }, + "///": { + "prefix": "///", + "description": "XML summary comment", + "body": [ + "/// ", + "/// $0", + "/// " + ] + }, + "$2" + }, + "$2" + }, + "$0" + }, + "$0" + } +} -- cgit v1.2.3