castwide / vscode-solargraph

A Visual Studio Code extension for Solargraph.
Other
424 stars 25 forks source link

Getting "Request textDocument/rename failed" when trying to rename #225

Closed wojtha closed 3 years ago

wojtha commented 3 years ago

Hello, I am getting the following error when trying to rename symbol in ruby.

[Error - 2:56:39 PM] Request textDocument/rename failed.
  Message: [NoMethodError] undefined method `any?' for nil:NilClass
  Code: -32603 

My environment:

Solargraph Environment Info

System

Platform: x86_64-darwin20
Shell: /usr/local/bin/fish
Ruby Version: 2.7.3
RuboCop Version: 1.18.3
Solargraph
Solargraph Version: 0.42.4
Core Documentation Version: 2.7.1
Core Cache Directory: /Users/wojtha/.solargraph/cache
Using Bundler: true

Project

Config: {"completion"=>true, "hover"=>true, "symbols"=>true, "definitions"=>true, "rename"=>true, "references"=>true, "autoformat"=>false, "diagnostics"=>false, "formatting"=>true, "folding"=>true, "logLevel"=>"warn", "enablePages"=>true, "viewsPath"=>"/Users/wojtha/.vscode/extensions/castwide.solargraph-0.23.0/views", "transport"=>"socket", "externalServer"=>{"host"=>"localhost", "port"=>7658}, "commandPath"=>"/Users/wojtha/.asdf/shims/solargraph", "useBundler"=>true, "bundlerPath"=>"/Users/wojtha/.asdf/shims/bundle", "checkGemVersion"=>true}
Workspace folders: ["/Users/wojtha/Code/hello-world"]
wojtha commented 3 years ago

Tweaked some settings and it is working now... 🤔