Open rogerprz opened 5 years ago
I am seeing the same behavior.
It looks like the issue is a result of Tree-Sitter parsing. The quick fix for this is to uncheck "Use Tree Sitter Parsers" in the Atom settings menu.
When that setting is enabled, the function return in ruby-block.coffee takes place when this condition is checked:
return if cursor.getScopeDescriptor().scopes.indexOf(@rubyKeywordControlScope) is -1
when @rubyKeywordControlScope
is set to 'keyword.control.ruby'
Rails is not using Tree-Sitter, so it uses a different layout for the array of scopes.
cursor.getScopeDescriptor().scopes
in Ruby:
Tree-Sitter Parsing off: ["source.ruby", "keyword.control.ruby"]
Tree-Sitter Parsing on: ["source.ruby", "keyword.control"]
I made some quick adjustments to get the constructor name for the grammar object (TreeSitterGrammar vs. Grammar) and check the arrays appropriately, but that introduces other objects later in the code (tokenizeLine is not an available method anymore).
Great. That worked.
Is this an issue that is likely to be fixed in this project, or is this a problem with Tree Sitter parsers and we're waiting for an upstream fix?
Not working for me: Atom v1.34.0 x64 on Ubuntu 18.04 Tried disabling the Tree Sitter Parsers as per above instructions, but no joy. Also tried switching grammar to Ruby on Rails. No highlighting or other good behavior observed in any of these settings.
Sort of works for me. If I click on the block end it will highlight the bock beginning, but not the other way around. Not terribly helpful after I've already located the block end.
It is kind of hidden, that, to get Ruby Block to work, you have to Uncheck "Use Tree Sitter Parsers"
Will there be any work to allow this package to work with "Use Tree Sitter Parsers" checked? Or, any communication to people downloading this package that they need to uncheck "Use Tree Sitter Parsers"?
New to submitting bug issues, but wanted to see if anyone else was experiencing the same.
By default Atom detects my .rb file as grammar for 'Ruby' file. The highlighting wasn't working until I switched from 'Ruby' to 'Ruby on Rails'.
Request: Able to detect and use in multiple 'Ruby*' grammar detections by default or checkbox ability.