-
-
Notifications
You must be signed in to change notification settings - Fork 81
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 remaining text based scope types to new scope handler setup #1052
Comments
I'm looking into migrating the notebook cell scope and just realize that we are actually using cursorless/queries/markdown.scm Lines 54 to 63 in 8cd7c21
The problem of course is that you can have markdown cells in a python notebook. What would |
I think that should just function like a nested scope, no? Haven't thought much about implementation but I think desired behaviour is well defined. Ie if you're in a code block in a markdown cell, then it targets next code block in the same cell if it exists, otherwise next cell. I believe that's how a nested scope would behave |
But what if you are not in a code block in markdown? Should Implementation wise I think it simplest to just ask the language scope provider and if we get no results go for a notebook cell. Does that sound good? |
I think the consistent thing to do if we're treating it as nested scope would be to go to next markdown code block if we find one in current cell, otherwise next cell Tho I do think that might be surprising, which kinda argues they should really be different scopes |
I think we will get that behavior if we do as I specified above. But a different scope for notebook cells is of course another option. Maybe we should start with a combined one and see if anyone runs into problem? |
We'd like to migrate all of our scope types to use the new scope handler setup introduced in #1031. See
TokenScopeHandler
,ScopeHandler
interface definition, andNestedScopeHandler
class, which might be of useScope types to migrate
notebookCell
to use a scope handler #1053document
to use a scope handler #1054paragraph
to use a scope handler #1055nonWhitespaceSequence
to use a scope handler #1056boundedNonWhitespaceSequence
to use a scope handler #1057url
to use a scope handler #1058collectionItem
to use a scope handler #1059customRegex
to use a scope handler #1060surroundingPair
to use a scope handler #1061The text was updated successfully, but these errors were encountered: