Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added insertion delimiter to Talon command #1789

Merged
merged 1 commit into from
Aug 15, 2023
Merged

Added insertion delimiter to Talon command #1789

merged 1 commit into from
Aug 15, 2023

Conversation

AndreasArvidsson
Copy link
Member

@AndreasArvidsson AndreasArvidsson commented Aug 15, 2023

Fixes #1785

Checklist

  • I have added tests
  • [/] I have updated the docs and cheatsheet
  • [/] I have not broken the cheatsheet

(command_declaration
right: (_) @_.interior
) @command
(#insertion-delimiter! @command "\n")
Copy link
Member

Choose a reason for hiding this comment

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

This isn't where we usually do this. Are you proposing that we always do this in our query file rather than in the usual spot?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think having the power to control this per language is an improvement? If you prefer I can put this in typescript.

Copy link
Member

Choose a reason for hiding this comment

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

No I don't have a strong feeling, just wondering why we didn't do this before, as we had a way to define insertion delimiters per-language before. I guess it's slightly less awkward now in this new syntax

Copy link
Member Author

Choose a reason for hiding this comment

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

I think things like functions and statements are similar enough that they probably have the same delimiter in most languages. For now this scope type is only used for a single language. Yeah and our new syntax makes it a bit easier to do this kind of thing.

@pokey pokey added this pull request to the merge queue Aug 15, 2023
Merged via the queue into main with commit bee6ed7 Aug 15, 2023
14 checks passed
@pokey pokey deleted the command_insertion branch August 15, 2023 08:51
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.

talon command scope delimiters not quite correct
2 participants