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

Method information shown on hover/click of the receiver #2846

Open
bananastalktome opened this issue Nov 11, 2024 · 0 comments
Open

Method information shown on hover/click of the receiver #2846

bananastalktome opened this issue Nov 11, 2024 · 0 comments
Labels
bug Something isn't working vscode This pull request should be included in the VS Code extension's release notes

Comments

@bananastalktome
Copy link

Description

Ruby LSP Information

Ruby LSP Information

VS Code Version

1.95.2

Ruby LSP Extension Version

0.8.13

Ruby LSP Server Version

0.21.3

Ruby LSP Addons

Ruby Version

3.2.2

Ruby Version Manager

rbenv

Installed Extensions

Click to expand
  • alphabetical-sorter (2.0.1)
  • azure-repos (0.40.0)
  • black-formatter (2024.4.0)
  • copilot (1.245.0)
  • copilot-chat (0.22.2)
  • debugpy (2024.12.0)
  • endwise (1.5.1)
  • gitlens (15.6.3)
  • isort (2023.10.1)
  • jupyter (2024.10.0)
  • jupyter-keymap (1.1.2)
  • jupyter-renderers (1.0.21)
  • markdown-all-in-one (3.6.2)
  • material-icon-theme (5.13.0)
  • material-theme (3.17.6)
  • php-debug (1.35.0)
  • php-docblocker (2.7.0)
  • python (2024.18.1)
  • remote-containers (0.388.0)
  • remote-explorer (0.4.3)
  • remote-repositories (0.42.0)
  • remote-ssh (0.115.0)
  • remote-ssh-edit (0.87.0)
  • remotehub (0.64.0)
  • ruby-lsp (0.8.13)
  • vscode-apache (1.2.0)
  • vscode-better-align (1.4.2)
  • vscode-bnf (0.0.1)
  • vscode-cfn-lint (0.26.0)
  • vscode-commons (0.0.6)
  • vscode-docker (1.29.3)
  • vscode-intelephense-client (1.12.6)
  • vscode-php-getters-setters-cv (1.6.1)
  • vscode-pylance (2024.11.1)
  • vscode-tailwindcss (0.12.12)
  • vscode-wordpress-hooks (1.4.0)
  • vscode-yaml (1.15.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": "rubocop",
  "linters": null,
  "bundleGemfile": "",
  "testTimeout": 30,
  "branch": "",
  "pullDiagnosticsOn": "both",
  "useBundlerCompose": false,
  "bypassTypechecker": false,
  "rubyExecutablePath": "",
  "indexing": {},
  "erbSupport": true,
  "useLauncher": false,
  "featureFlags": {}
}

Reproduction steps

  1. Create a new project with the minimum requirements for ruby-lsp to run (gemfile, and rbenv .ruby-version for me)
  2. Create a test.rb with the following:
class Foo
  def message
    'hello!'
  end
end

class Bar
  def with_foo(foo)
    @foo_message = foo.message
  end
end
  1. Hover or CMD+hover over foo on line 9, and see the popup is info for the message method. CMD+Click on foo takes you to def message (line 2).
    Image
  2. The behavior works as expected when Hovering or CMD+hover and CMD+Click on message on line 9 (shows message info in popup takes you to def message on line 2 when clicked).

I would expect for foo to either not have a clickable behavior (or ideally, but probably out of scope for this request to go to foo in the with_foo method definition)

@bananastalktome bananastalktome added bug Something isn't working vscode This pull request should be included in the VS Code extension's release notes labels Nov 11, 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

1 participant