Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax highlighting not working properly #2735

Closed
baelter opened this issue Oct 18, 2024 · 4 comments
Closed

Syntax highlighting not working properly #2735

baelter opened this issue Oct 18, 2024 · 4 comments
Labels
bug Something isn't working vscode This pull request should be included in the VS Code extension's release notes

Comments

@baelter
Copy link

baelter commented Oct 18, 2024

Description

Ruby LSP Information

Ruby LSP Information

VS Code Version

1.94.2

Ruby LSP Extension Version

0.8.6

Ruby LSP Server Version

0.20.1

Ruby LSP Addons

Ruby Version

3.3.5

Ruby Version Manager

rbenv

Installed Extensions

Click to expand
  • better-comments (3.0.2)
  • haml-lint (0.2.1)
  • project-manager (12.8.0)
  • auto-add-brackets (0.12.2)
  • markdown-mermaid (1.25.0)
  • mermaid-markdown-syntax-highlighting (1.6.6)
  • systemd-unit-file (1.0.6)
  • crystal-lang (0.9.6)
  • doxdocgen (1.4.0)
  • vscode-markdownlint (0.56.0)
  • gitlens (15.6.2)
  • vscode-html-css (2.0.10)
  • EditorConfig (0.16.4)
  • RunOnSave (0.2.4)
  • copilot (1.239.0)
  • copilot-chat (0.21.2)
  • vscode-github-actions (0.27.0)
  • vscode-pull-request-github (0.98.0)
  • todo-tree (0.0.226)
  • output-colorizer (0.1.2)
  • workspacesort (1.6.2)
  • custom-local-formatters (0.0.6)
  • haml (1.4.1)
  • vscode-rdbg (0.2.2)
  • rainbow-csv (3.12.0)
  • dotenv (1.0.1)
  • vscode-kubernetes-tools (1.3.18)
  • debugpy (2024.12.0)
  • isort (2023.10.1)
  • python (2024.16.1)
  • vscode-pylance (2024.10.1)
  • jupyter (2024.9.1)
  • remote-containers (0.388.0)
  • remote-ssh (0.115.0)
  • remote-wsl (0.88.4)
  • makefile-tools (0.11.13)
  • remote-explorer (0.4.3)
  • vsliveshare (1.0.5941)
  • vscode-template-literal-editor (0.10.0)
  • vscode-yaml (1.15.0)
  • vscode-sort-json (1.20.0)
  • vscode-qt-for-python (7.6.0)
  • ruby-extensions-pack (0.1.12)
  • ruby-lsp (0.8.6)
  • sorbet-vscode-extension (0.3.37)
  • vscode-standard (2.1.3)
  • code-spell-checker (3.0.1)
  • vscode-stylelint (1.4.0)
  • shellcheck (0.37.1)
  • errorlens (3.20.0)
  • vscode-lldb (1.11.0)
  • crystal-ameba (0.2.1)
  • simple-ruby-erb (0.2.1)
  • vscode-gradle (3.16.4)
  • debug (0.27.0)

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": {},
  "addonSettings": {},
  "rubyVersionManager": {
    "identifier": "auto"
  },
  "customRubyCommand": "",
  "formatter": "auto",
  "linters": null,
  "bundleGemfile": "",
  "testTimeout": 30,
  "branch": "",
  "pullDiagnosticsOn": "both",
  "useBundlerCompose": false,
  "bypassTypechecker": false,
  "rubyExecutablePath": "",
  "indexing": {},
  "erbSupport": true
}

Reproduction steps

  1. Start the Ruby LSP using a certain editor
  2. Open a Ruby file
  3. Do something
  4. See unexpected behavior

Symbols are sometimes broken in half and highlighting just goes crazy.

Image
Image

@baelter baelter added bug Something isn't working vscode This pull request should be included in the VS Code extension's release notes labels Oct 18, 2024
@vinistock
Copy link
Member

Thank you for the bug report! Can you share a minimal Ruby snippet that reproduces the issue? I suspect that this might be related to how we handle multibyte characters, but there's no way to tell if we don't know what syntax triggers it.

@andyw8
Copy link
Contributor

andyw8 commented Oct 18, 2024

Also @baelter, have you noticed if this happens only when you open files from outside of the workspace?

@st0012 st0012 removed their assignment Oct 18, 2024
@baelter
Copy link
Author

baelter commented Oct 21, 2024

I haven't been able to narrow it down unfortunately. It's not related to opening files outside the workspace though.
It could be related to there being a syntax error in on open file, but I can say conclusively. I'll try to gather more info.

@baelter
Copy link
Author

baelter commented Oct 21, 2024

Probably not an issue on your end, just saw it happen for a colleague that uses solargraph.

@baelter baelter closed this as completed Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working vscode This pull request should be included in the VS Code extension's release notes
Projects
None yet
Development

No branches or pull requests

4 participants