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

Migrated surrounding pair scope handler #2457

Draft
wants to merge 46 commits into
base: main
Choose a base branch
from

Conversation

AndreasArvidsson
Copy link
Member

@AndreasArvidsson AndreasArvidsson commented Jul 1, 2024

Fixes #2316

Checklist

  • I have added tests
  • [/] I have updated the docs and cheatsheet
  • I have not broken the cheatsheet
  • Add @disqualifyDelimiter for all languages
  • Add plural form of surrounding pair scopes.py

@AndreasArvidsson
Copy link
Member Author

I would argue that this is not a matching delimiter pair at all. It is the scope type string which we have no spoken form for at the moment.
https://github.com/cursorless-dev/cursorless/blob/766864d9fa979124283b236bbb4738204a13fe45/data/fixtures/recorded/languages/ruby/changeString2.yml

Copy link
Member

@pokey pokey left a comment

Choose a reason for hiding this comment

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

Haven't reviewed everything, but left a few comments

@AndreasArvidsson
Copy link
Member Author

AndreasArvidsson commented Jul 4, 2024

This is really interesting

"if the file is over 30MB or over 300k lines, we consider it to be a very large file and proceed to turn off very many features, including tokenization, word wrapping, indent guides, anything that would consume additional memory, etc."
microsoft/vscode#32118 (comment)

That means that Cursorless can never encounter a file with over three hundred thousand lines. I just did a test with the surrounding pair regex on a file with just below three hundred thousand lines and that clocked in at 274ms. I would say that is a bit on the high side so we might want to do some windowing, but we definitely don't need to be as careful as we was before. Doing it at tens of thousand lines at the time probably is fine.

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.

"Take inside" doesn't work in C++ with #pragma line
2 participants