ruby-lsp icon indicating copy to clipboard operation
ruby-lsp copied to clipboard

Syntax highlight of parens is broken when using heredoc as argument

Open eggplants opened this issue 2 years ago • 3 comments

Operating System

MacOS

Ruby version

3.0.6

Project has a bundle

  • [X] Has bundle

Ruby version manager being used

rbenv

Description

With paren:

def a(arg1, arg2)
  p arg1, arg2
end

a(<<~EOS.chomp, 1)
  123123
EOS
スクリーンショット 2023-08-25 14 22 21

Without paren:

def a(arg1, arg2)
  p arg1, arg2
end

a <<~EOS.chomp, 1
  123123
EOS
スクリーンショット 2023-08-25 14 25 40

eggplants avatar Aug 25 '23 05:08 eggplants

For anyone who ends up investigating this, it is related to the grammar file. We do not push semantic highlighting tokens for heredocs or parenthesis as they are not ambiguous tokens.

vinistock avatar Aug 25 '23 13:08 vinistock

This issue is being marked as stale because there was no activity in the last 2 months

github-actions[bot] avatar Oct 25 '23 12:10 github-actions[bot]

Is there any update here? this isn't only a problem with parens. Ruby syntax doesn't recognize squiggly heredoc blocks as a string either:

Screenshot 2024-02-24 at 13 18 13

SampsonCrowley avatar Feb 24 '24 20:02 SampsonCrowley