Closed steiley closed 6 years ago
@steiley
Thank you for your reporting!
How do you boot the lang server?
In my thought, the server should be added to your project's Gemfile.
@mtsmfm Thank you for your response!
Sorry to forget to tell you that I use VS code(version 1.17.2). I installed the language server in a local ruby environment. The language server is booted by vscode-ruby-lsc.
I added to my project's Gemfile after receiving your advice. But the same error occurs.
Is there anything else I must do?
@steiley
Sorry, my repos lack documentation 💦
Could you change ruby-lsc.commandWithArgs
?
https://github.com/mtsmfm/vscode-ruby-lsc#ruby-lsccommandwithargs
Like following:
{
"ruby-lsc.commandWithArgs": [
"bundle", "exec", "language_server-ruby"
]
}
In my thought, the lang server will be booted via bundler as same as your application.
@mtsmfm
I changed ruby-lsc.commandWithArgs
as you suggested
But the result was the same.
A project directory isn't parsed unless this project root directory is added to $LOAD_PATH. It seems that there is no point to add that to $LOAD_PATH.
I want to use the Definition for rails development. For exampe contoller A(/rails_root/app/controllers/a.rb) use model B(/rails_root/app/models/b.rb) in a.rb. In that case I want to jump from a.rb to b.rb using the Definition.
Actucally it is not supposed to be.
That case may be not included in your assumption. I hope I can do this if possible.
Sorry for the inconvenience.
Adhoc definition provider still has some bugs so I've added --experimental-features
flag and disabled it by default.
Close this PR for now but I'm happy if you sent me the code/project you opened at the time.
The following error message always appears on the output of vs code when I select [go to definition] or [show definitions] with the file of my project in editor pane.
I think it happens because my project directory is out of scope. That seems good to me adding the project root directory to the load path in the initialization process.
What do you think?