Skip to content

Syntax highlighting broken when a variable is inserted in a heredoc #2492

Open

Description

Description

Syntax highlighting is broken after the heredoc when a variable is inserted if it's not surrounded by double quotes. See the examples provided below. The only change was on line 6, I removed the " around the pr_number variable.

Ruby LSP Information

Ruby LSP Information

VS Code Version

1.92.2

Ruby LSP Extension Version

0.7.17

Ruby LSP Server Version

0.17.16

Ruby LSP Addons

Ruby Version

3.2.2

Ruby Version Manager

none

Installed Extensions

Click to expand
  • github-markdown-preview (0.3.0)
  • markdown-checkbox (0.4.0)
  • markdown-emoji (0.3.0)
  • markdown-footnotes (0.1.1)
  • markdown-mermaid (1.23.1)
  • markdown-preview-github-styles (2.0.4)
  • markdown-yaml-preamble (0.1.0)
  • markdown-table-prettify (3.6.0)
  • vscode-markdownlint (0.55.0)
  • languagetool-linter (0.21.4)
  • vscode-eslint (3.0.10)
  • prettier-vscode (11.0.0)
  • markdown-table-formatter (3.0.0)
  • copilot (1.223.0)
  • copilot-chat (0.18.2)
  • vscode-github-actions (0.26.3)
  • vscode-pull-request-github (0.94.0)
  • go (0.42.0)
  • vscode-docker (1.29.2)
  • debugpy (2024.10.0)
  • isort (2023.10.1)
  • python (2024.12.3)
  • vscode-pylance (2024.8.2)
  • azurecli (0.6.0)
  • vscode-typescript-next (5.7.20240825)
  • wordcount (0.1.0)
  • vsliveshare (1.0.5936)
  • vscode-xml (0.27.1)
  • vscode-yaml (1.15.0)
  • remove-tabs-on-save (1.2.4)
  • ruby-extensions-pack (0.1.11)
  • ruby-lsp (0.7.17)
  • vscode-fileutils (3.10.3)
  • sorbet-vscode-extension (0.3.36)
  • code-spell-checker (3.0.1)
  • vscode-stylelint (1.4.0)
  • shellcheck (0.37.1)
  • alex-linter (0.6.6)
  • write-good-linter (0.1.5)
  • markdown-all-in-one (3.6.2)

Ruby LSP Settings

Click to expand
Workspace
{}
User
{
  "enableExperimentalFeatures": false,
  "enabledFeatures": {
    "codeActions": true,
    "diagnostics": true,
    "documentHighlights": true,
    "documentLink": true,
    "documentSymbols": true,
    "foldingRanges": true,
    "formatting": true,
    "hover": true,
    "inlayHint": true,
    "onTypeFormatting": true,
    "selectionRanges": true,
    "semanticHighlighting": true,
    "completion": true,
    "codeLens": true,
    "definition": true,
    "workspaceSymbol": true,
    "signatureHelp": true,
    "typeHierarchy": true
  },
  "featuresConfiguration": {},
  "rubyVersionManager": {
    "identifier": "none"
  },
  "customRubyCommand": "",
  "formatter": "auto",
  "linters": null,
  "bundleGemfile": "",
  "testTimeout": 30,
  "branch": "",
  "pullDiagnosticsOn": "both",
  "useBundlerCompose": false,
  "bypassTypechecker": false,
  "rubyExecutablePath": "",
  "indexing": {},
  "erbSupport": true
}

Reproduction steps

Write a heredoc with a variable that isn't surrounded by dobule quotes.

Normal highlighting:

Image

Broken highlighting (but still valid ruby):

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

bugSomething isn't workinghelp-wantedExtra attention is neededpinnedThis issue or pull request is pinned and won't be marked as stalevscodeThis pull request should be included in the VS Code extension's release notes

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions