Description
Ruby LSP Information
VS Code Version
1.99.3
Ruby LSP Extension Version
0.9.16
Ruby LSP Server Version
0.23.14
Ruby LSP Add-ons
Ruby Version
3.4.2
Ruby Version Manager
rbenv
Installed Extensions
Click to expand
Ruby LSP Settings
Click to expand
Workspace
User
{
"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,
"featureFlags": {},
"sigOpacityLevel": "1"
}Reproduction steps
Create an empty ruby file, put
classSomeClassdefprint_debug_infoendendsc=SomeClass.new
Hover the mouse over the variable sc I don't see its type. And type sc. in the following lines, print_debug_info is not among the auto suggestions, while method_missing is, along with a bunch of others.
Is this something wrong with my configuration? I did a bit of searching, noticed that when I type SomeClass.new, the suggestion comes from class.rbs, where the .new method is marked untyped. And I talked to Google Gemini a bit, it replied that the .rbs system lacks generics for the moment, something like Class<T> in Java, therefore the return value can only be untyped for the moment.
Not sure if this is true, but should ruby-lsp make some workaround about this? It's just everyday life.
Description
Ruby LSP Information
VS Code Version
1.99.3
Ruby LSP Extension Version
0.9.16
Ruby LSP Server Version
0.23.14
Ruby LSP Add-ons
Ruby Version
3.4.2
Ruby Version Manager
rbenv
Installed Extensions
Click to expand
Ruby LSP Settings
Click to expand
Workspace
{}User
{ "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, "featureFlags": {}, "sigOpacityLevel": "1" }Reproduction steps
Create an empty ruby file, put
Hover the mouse over the variable
scI don't see its type. And typesc.in the following lines,print_debug_infois not among the auto suggestions, whilemethod_missingis, along with a bunch of others.Is this something wrong with my configuration? I did a bit of searching, noticed that when I type
SomeClass.new, the suggestion comes fromclass.rbs, where the.newmethod is markeduntyped. And I talked to Google Gemini a bit, it replied that the.rbssystem lacks generics for the moment, something likeClass<T>in Java, therefore the return value can only beuntypedfor the moment.Not sure if this is true, but should ruby-lsp make some workaround about this? It's just everyday life.