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

Migrate notebookCell to use a scope handler #1053

Closed
Tracked by #1052
pokey opened this issue Oct 21, 2022 · 0 comments · Fixed by #2693
Closed
Tracked by #1052

Migrate notebookCell to use a scope handler #1053

pokey opened this issue Oct 21, 2022 · 0 comments · Fixed by #2693
Assignees
Labels
bug Something isn't working enhancement New feature or request good first issue Good for newcomers

Comments

@pokey
Copy link
Member

pokey commented Oct 21, 2022

No description provided.

@pokey pokey added bug Something isn't working enhancement New feature or request good first issue Good for newcomers labels Oct 21, 2022
@AndreasArvidsson AndreasArvidsson self-assigned this Jul 3, 2023
@AndreasArvidsson AndreasArvidsson removed their assignment Aug 7, 2023
@AndreasArvidsson AndreasArvidsson self-assigned this Nov 23, 2024
github-merge-queue bot pushed a commit that referenced this issue Jan 19, 2025
Fixes #1053

Related #1052

I'm sure how we're gonna support the python comment style cells

```py
# %%
print("hello")
```

We have tests for them:
https://github.com/cursorless-dev/cursorless/blob/56ad4c5cef3f8c8267a098a375cf9139cbbfb0ff/data/fixtures/recorded/selectionTypes/pourCell.yml
But they are not a cell scope you can actually target. Tree sitter just
sees these as a comment and a function call. We could
1. Remove them. I'm probably leaning towards this.
2. Try to use regular expression to actually support them properly. That
means we're back to language specific implementations in typescript.
3. Do what we did before and just yield the current position as a
notebook target. Feels very hacky and not something I would like to do.

## Checklist

- [/] I have added
[tests](https://www.cursorless.org/docs/contributing/test-case-recorder/)
- [/] I have updated the
[docs](https://github.com/cursorless-dev/cursorless/tree/main/docs) and
[cheatsheet](https://github.com/cursorless-dev/cursorless/tree/main/cursorless-talon/src/cheatsheet)
- [/] I have not broken the cheatsheet

---------

Co-authored-by: Phil Cohen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request good first issue Good for newcomers
Projects
None yet
2 participants