-
Notifications
You must be signed in to change notification settings - Fork 283
Every code structure which closes with end keyword is now distinguishable #666
Every code structure which closes with end keyword is now distinguishable #666
Conversation
Codecov Report
@@ Coverage Diff @@
## master #666 +/- ##
======================================
Coverage 5.08% 5.08%
======================================
Files 10 10
Lines 118 118
Branches 20 20
======================================
Hits 6 6
Misses 112 112
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
|
For testing you can install this theme |
|
@graceful-potato can you update this to account for your two other PRs that I merged? |
|
@wingrunr21 ok, I will do it today. |
b5d4895 to
a9e1145
Compare
|
Wait, did I mess up with rebase somehow? I can see changes from #647 but these changes already in the master. I am confused. @wingrunr21 Update |
a9e1145 to
ed97a8d
Compare
|
This pull request is so exciting! Am I right in that it'll enable the development of going to matching |
|
@kylesnowschwartz I am not sure about it. As far as i know its not so easy to get textmate scope from vscode extension. There is no API for that still. |
|
@kylesnowschwartz the only way I found so far is to parse it again within extension, then you can get all scopes and found everything you want. I tried to fix #656 with this approach and I think it works fine. The only disadvantage is the need to parse the file twice. |
b349066 to
7170d6c
Compare
7170d6c to
19ae425
Compare
|
This PR has not had activity for 30 days. It will be automatically closed in 7 days. |
|
Ping and quick update. |
|
This PR has not had activity for 30 days. It will be automatically closed in 7 days. |
|
@wingrunr21 Hey there, I think i have a solution for endless methods. |
Added ability to distinguish end keyword between
class,module,def,do,if,unless,while,until,for,beginand highlight these structures differently.Added new scopes:
keyword.control.class.begin.rubyfor keywordclasskeyword.control.class.end.rubyfor keywordendwhich closes classmeta.class.rubyfor everything betweenclassandendkeyword.control.module.begin.rubyfor keywordmodulekeyword.control.module.end.rubyfor keywordendwhich closes modulemeta.module.rubyfor everything betweenmoduleandendkeyword.control.for.begin.rubyfor keywordforkeyword.control.for.end.rubyfor keywordendwhich closes for loopmeta.block.for.rubyfor everything betweenforandendkeyword.control.do.begin.rubyfor keyworddokeyword.control.do.end.rubyfor keywordendwhich closes do blockmeta.block.do.rubyfor everything betweendoandendkeyword.control.begin.begin.rubyfor keywordbeginkeyword.control.begin.end.rubyfor keywordendwhich closes begin-end blockmeta.block.begin.rubyfor everything betweenbeginandendkeyword.control.conditional.case.begin.rubyfor keywordcasekeyword.control.conditional.case.end.rubyfor keywordendwhich closes case blockmeta.block.case.rubyfor everything betweencaseandendkeyword.control.conditional.if.begin.rubyfor keywordif(if block, not modifier)keyword.control.conditional.if.end.rubyfor keywordendwhich closes if blockmeta.block.if.rubyfor everything betweenifandendkeyword.control.modifier.conditional.if.rubyforifmodifier (perform if condition)keyword.control.conditional.unless.begin.rubyfor keywordunless(unless block, not modifier)keyword.control.conditional.unless.end.rubyfor keywordendwhich closes unless blockmeta.block.unless.rubyfor everything betweenunlessandendkeyword.control.modifier.conditional.unless.rubyforunlessmodifier (perform unless condition)keyword.control.while.begin.rubyfor keywordwhile(while block, not modifier)keyword.control.while.end.rubyfor keywordendwhich closes while blockmeta.block.while.rubyfor everything betweenwhileandendkeyword.control.modifier.while.rubyforwhilemodifier (perform while condition)keyword.control.until.begin.rubyfor keyworduntil(until block, not modifier)keyword.control.until.end.rubyfor keywordendwhich closes until blockmeta.block.until.rubyfor everything betweenuntilandendkeyword.control.modifier.until.rubyforuntilmodifier (perform until condition)keyword.control.def.begin.rubyfor keyworddefkeyword.control.def.end.rubyfor keywordendwhich closes method blockmeta.function.method.with-arguments.rubyormeta.function.method.without-arguments.rubyfor everything betweendefandendkeyword.control.rescue.rubyfor keywordrescuekeyword.control.ensure.rubyfor keywordensurekeyword.control.conditional.else.rubyfor keywordelsekeyword.control.conditional.elsif.rubyfor keywordelsifkeyword.control.conditional.when.rubyfor keywordwhenkeyword.control.conditional.then.rubyfor keywordthenkeyword.control.BEGIN.rubyfor keywordBEGINkeyword.control.END.rubyfor keywordENDkeyword.control.optional.do.rubyfor optionaldolike in for loop and while looppunctuation.accessor.singleton.rubyfor<<in expressions likeclass << selfEach
endkeyword also has a scopekeyword.control.end.ruby