diff --git a/lang/csharp/code_common_function.talon-list b/lang/csharp/code_common_function.talon-list index 2b63140977..257d7063bd 100644 --- a/lang/csharp/code_common_function.talon-list +++ b/lang/csharp/code_common_function.talon-list @@ -2,6 +2,34 @@ list: user.code_common_function code.language: csharp - -integer: int.TryParse -print: Console.WriteLine -string: .ToString +integer: "int.TryParse" +print: "Console.WriteLine" +string: ".ToString" +length: ".Length" +order by: "OrderBy" +order by descending: "OrderByDescending" +then by: "ThenBy" +then by descending: "ThenByDescending" +include: "Include" +group by: "GroupBy" +select: "Select" +where: "Where" +first or default: "FirstOrDefault" +first: "First" +first or default async: "FirstOrDefaultAsync" +first async: "FirstAsync" +single or default: "SingleOrDefault" +contains: "Contains" +count: "Count" +to list: "ToList" +to list async: "ToListAsync" +to array: "ToArray" +to dictionary: "ToDictionary" +to lower: "ToLower" +to upper: "ToUpper" +trim: "Trim" +trim start: "TrimStart" +trim end: "TrimEnd" +substring: "Substring" +replace: "Replace" +split: "Split" diff --git a/lang/csharp/code_keyword.talon-list b/lang/csharp/code_keyword.talon-list new file mode 100644 index 0000000000..1201e0578f --- /dev/null +++ b/lang/csharp/code_keyword.talon-list @@ -0,0 +1,90 @@ +list: user.code_keyword +code.language: csharp +code.language: aspnetcorerazor +- + +abstract: " abstract " +add: " add " +alias: " alias " +ascending: " ascending " +async: " async " +await: " await " +base: " base " +boolean: " bool " +break: " break " +case: " case " +catch: " catch " +class: " class " +const: " const " +continue: " continue " +default: " default " +delegate: " delegate " +descending: " descending " +double: " double " +dynamic: " dynamic " +else: " else " +enum: " enum " +equals: " equals " +event: " event " +explicit: " explicit " +extern: " extern " +false: " false " +finally: " finally " +for: " for " +foreach: " foreach " +from: " from " +get: " get " +global: " global " +group: " group " +if: " if " +implicit: " implicit " +in: " in " +integer: " int " +interface: " interface " +internal: " internal " +into: " into " +is: " is " +join: " join " +let: " let " +lock: " lock " +name of: " nameof " +namespace: " namespace " +new: " new " +null: " null " +operator: " operator " +order by: " orderby " +out: " out " +override: " override " +params: " params " +partial: " partial " +private: " private " +protected: " protected " +public: " public " +read only: " readonly " +ref: " ref " +remove: " remove " +required: " required " +return: " return " +sealed: " sealed " +select: " select " +set: " set " +size of: " sizeof " +static: " static " +string: " string " +struct: " struct " +switch: " switch " +this: " this " +throw: " throw " +true: " true " +try: " try " +type of: " typeof " +unsafe: " unsafe " +using: " using " +value: " value " +var: " var " +virtual: " virtual " +volatile: " volatile " +void: " void " +where: " where " +while: " while " +yield: " yield " diff --git a/lang/csharp/csharp.py b/lang/csharp/csharp.py index 84dd0ab660..0ee38fe26b 100644 --- a/lang/csharp/csharp.py +++ b/lang/csharp/csharp.py @@ -1,13 +1,18 @@ -from talon import Context, actions, settings +from talon import Context, Module, actions, settings from ...core.described_functions import create_described_insert_between from ..tags.operators import Operators +mod = Module() + ctx = Context() ctx.matches = r""" code.language: csharp """ +mod.list("code_common_function", desc="Common C# functions") +mod.list("code_keyword", desc="Common C# keywords") + operators = Operators( # code_operators_array SUBSCRIPT=create_described_insert_between("[", "]"), diff --git a/lang/csharp/csharp.talon b/lang/csharp/csharp.talon index 95972f6501..cf2c47b63c 100644 --- a/lang/csharp/csharp.talon +++ b/lang/csharp/csharp.talon @@ -17,6 +17,7 @@ tag(): user.code_operators_bitwise tag(): user.code_operators_lambda tag(): user.code_operators_math tag(): user.code_operators_pointer +tag(): user.code_keywords settings(): user.code_private_function_formatter = "PRIVATE_CAMEL_CASE"