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

Support testing decorations #199

Closed
pokey opened this issue Aug 7, 2021 · 3 comments · Fixed by #672
Closed

Support testing decorations #199

pokey opened this issue Aug 7, 2021 · 3 comments · Fixed by #672
Assignees
Labels
code quality Improvements to code quality

Comments

@pokey
Copy link
Member

pokey commented Aug 7, 2021

We'd basically do all decorations through a mockable interface and then dump them along with the rest of the yaml. For actions that decorate twice, we could track both, and compare document contents at time of decoration to initial and final state, and then store them as pre- or post-decoration based on that

see https://github.com/cursorless-dev/cursorless/blob/main/src/core/editStyles.ts

@pokey pokey added the code quality Improvements to code quality label Aug 7, 2021
@pokey pokey mentioned this issue Aug 11, 2021
2 tasks
@AndreasArvidsson
Copy link
Member

AndreasArvidsson commented May 27, 2022

First draft

thatMark:
    - anchor: {line: 2, character: 4}
      active: {line: 2, character: 4}
    - anchor: {line: 4, character: 0}
      active: {line: 4, character: 0}
decorations:
    - name: pendingDeleteBackground
      type: token
      start: {line: 2, character: 4}
      end: {line: 2, character: 10}
    - name: pendingDeleteBackground
      type: line
      start: {line: 4, character: 4}
      end: {line: 4, character: 18}

@pokey
Copy link
Member Author

pokey commented May 27, 2022

cool! I'm assuming that decorations will be top-level indent?

@AndreasArvidsson
Copy link
Member

AndreasArvidsson commented May 27, 2022

Correct. It is, something weird happened when I pasted it

@pokey pokey closed this as completed in #672 Jun 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code quality Improvements to code quality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants