Skip to content

Add common C# keywords and functions to Talon lists#2225

Open
Mark-Phillipson wants to merge 3 commits into
talonhub:mainfrom
Mark-Phillipson:add/csharp-code-keywords
Open

Add common C# keywords and functions to Talon lists#2225
Mark-Phillipson wants to merge 3 commits into
talonhub:mainfrom
Mark-Phillipson:add/csharp-code-keywords

Conversation

@Mark-Phillipson

Copy link
Copy Markdown
Contributor

This pull request introduces a new Talon list file that contains the C# keywords. Additionally, it moves the common functions related to C# into a Talon list to improve organization and accessibility. These changes aim to enhance the overall functionality for users working with C# in Talon.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: abe99cb597

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread lang/csharp/code_common_function.talon-list Outdated
Comment thread lang/csharp/code_keyword.talon-list Outdated

@FireChickenProductivity FireChickenProductivity left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am glad to see someone else helping expand our language support!

It is generally recommended to put separate features in separate pull requests for the reasons outlined in the CONTRIBUTING.md file. That would probably get one of your list changes merged faster.

Comment thread lang/csharp/csharp.py
code.language: csharp
"""

mod.list("code_common_function", desc="Common C# functions")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should not be redefining these lists on a module.

Comment on lines +7 to +8
string: ".ToString"
length: ".Length"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We usually use user.code_common_method for methods.

@@ -0,0 +1,90 @@
list: user.code_keyword
code.language: csharp
code.language: aspnetcorerazor

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can code.language get set to this if we do not have the language defined in Community? Can you check if this triggers with help scope? code.language is under Misc if a language is detected.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the community backlog session — we are aware that this is in another PR. Consider removing code.language: aspnetcorerazor until we have a decision on that PR.

@@ -0,0 +1,90 @@
list: user.code_keyword
code.language: csharp
code.language: aspnetcorerazor

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the community backlog session — we are aware that this is in another PR. Consider removing code.language: aspnetcorerazor until we have a decision on that PR.

Comment on lines +6 to +90
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 "

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the community backlog session — our general pattern is not to include leading spaces in user.code_keyword (operators like "and" and "or" are rare exceptions). Only include trailing spaces where there is always expected to be something after it (not including punctuation like commas or semicolons).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants