Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Commit

Permalink
Don't do ruby-specific behavior in all tree-sitter languages
Browse files Browse the repository at this point in the history
  • Loading branch information
maxbrunsfeld committed Nov 8, 2018
1 parent 09a27af commit 2b01aaf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/bracket-matcher.coffee
Expand Up @@ -187,7 +187,8 @@ class BracketMatcher
if languageMode.getSyntaxNodeAtPosition?
node = languageMode.getSyntaxNodeAtPosition(
cursor.getBufferPosition(),
(node) -> /string|symbol/.test(node.type)
(node, grammar) ->
grammar.scopeName is 'source.ruby' and /string|symbol/.test(node.type)
)
['"', ':"', '%('].includes(node?.firstChild?.text)
else
Expand Down

0 comments on commit 2b01aaf

Please sign in to comment.