Migrate block comment commands to actions#2171
Migrate block comment commands to actions#2171FireChickenProductivity wants to merge 28 commits into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1d5a7c1c73
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
for more information, see https://pre-commit.ci
|
Is the plan to convert these to snippets in a follow up PR? |
There are no followup plans yet. Suggestions are welcome. This PR is mostly to satisfy an ancient todo comment. |
There was a problem hiding this comment.
From the community backlog session — makes sense as a first step, migrating the implementations from voice commands to actions. Could you please rename all the new actions to start with code_block_? Also for the actions that include a new optional argument, can you use snippet insertion or a single insert to insert both the comment delimiters and contents in a single action? Thanks!
What about instead using |
for more information, see https://pre-commit.ci
|
There was no clear way to do the c like block comment insertion in a single insert without changing behavior. We may want to leave updating that one for a snippet migration follow up. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: eceb6cf3ba
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| substitutions = None | ||
| if text is not None: | ||
| substitutions = {"0": text} | ||
| actions.user.insert_snippet_by_name("commentBlock", substitutions) |
There was a problem hiding this comment.
Insert dictated block-comment text literally
Routing code_comment_block(text) through snippet substitutions changes dictation handling from literal insertion to regex replacement semantics; in languages using this default action (e.g. non-code_comment_block_c_like contexts), backslash sequences like \t, \1, or \g<1> in dictated text are altered or can throw regex errors, whereas the previous implementation inserted the spoken text as-is.
Useful? React with 👍 / 👎.
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
|
This now changes the lua snippet for block comments to be consistent with the rest by creating an inline comment. I should probably update breaking changes before merge but want feedback first. I created a separate snippet for multiline block comments so that lua could override the block comment action to use that instead. Is that an acceptable solution to minimize disruption for lua programmers? |
Migrate block comment commands to use actions. I fixed one of the commands not always making the comment on a single line as a side effect of the snippet migration.
The differences between these commands are not very clear from the names. There is stuff to improve here, but I would prefer to make this PR just a migration.