Skip to content

Broken syntax highlighting with <<10 in interpolated String #4065

@eregon

Description

@eregon

Description

Ruby LSP Information

Ruby LSP Information

VS Code Version

1.115.0

Ruby LSP Extension Version

0.10.2

Ruby LSP Server Version

0.26.9

Ruby LSP Add-ons

Ruby Version

3.3.5

Ruby Version Manager

chruby

Installed Extensions

Click to expand
  • cmake (0.0.17)
  • cmake-tools (1.23.51)
  • code-spell-checker (4.5.6)
  • cpp-devtools (0.4.6)
  • cpptools (1.31.4)
  • cpptools-extension-pack (1.5.1)
  • cpptools-themes (2.0.0)
  • debugpy (2025.18.0)
  • python (2026.4.0)
  • ruby-lsp (0.10.2)
  • rust-analyzer (0.3.2862)
  • test-adapter-converter (0.2.1)
  • vscode-github-actions (0.31.3)
  • vscode-jsonnet (0.7.4)
  • vscode-pylance (2026.2.1)
  • vscode-test-explorer (2.22.1)

Ruby LSP Settings

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

Reproduction steps

Open https://github.com/ruby/net-imap/blob/de685f91a4a4cc75eb80da898c2bf8af08d34819/test/net/imap/test_response_reader.rb in VSCode and see:
Image

FWIW, this also happens with ruby-lsp disabled.
Changing 16 << 10 to 16 << 10 works around it, but I expect Ruby LSP to have correct syntax highlighting.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions