cursorless-dev / cursorless

Don't let the cursor slow you down

Home Page:https://www.cursorless.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Simplification to scope fixtures

AndreasArvidsson opened this issue · comments

I do wonder if we also should remove empty range lines? Having those empty lines in the middle of the code block doesn't really help you with readability. Also now that we exclude lines outside of the range I'm tempted to go back to having the start range be above the code.

source:

class MyClass {
  myFunk() {

  }
}

scope:

    >----------
1|   myFunk() {
2|
3|   }
   ---<

for single-line (eg "name"):

    >------<
1|   myFunk() {

Originally posted by @AndreasArvidsson in #2207 (comment)

What do we do for single-line scopes? Put the annotation below? I think consistency is the most important thing for readability here. Having the line sometimes above and sometimes below feels inconsistent.

I could go either way. Personally I feel that fewer lines is easier to read at a glance.

Once my name / value is merged (should be today), we'll have a decent number of tests. Might make sense to just implement this one and see how the fixtures look. I can't imagine it would take more than half an hour

Sounds reasonable