-
Notifications
You must be signed in to change notification settings - Fork 41
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
definition not able to locate elixir sources on some ocasions #44
Comments
In case it is helpful, that repo has Rexbug printing out a trace to help quickly see each function's arguments and return value. |
I see now that if I install elixir from source (e.g. with |
@balduncle yes, we can only "find definition" or "go to definition" if Elixir was installed from source. Not sure if there's another way to do this. Maybe we could accept an option like
We should definitely have that explicit in the docs, however, remember that the end-user doesn't even know that he should read ElixirSense's docs when something doesn't work as expected, he just uses the editor that uses a plugin that uses ElixirSense under the hood.
I'm open to suggestions here ;) |
Yeah, I like the idea of having the editors download the source. It would alleviate tickets like JakeBecker/vscode-elixir-ls#123. I'm willing to try to tackle this for vscode-elixir-ls, for what it's worth. Fair point on the docs being more valuable for end users if present in a library that calls into ElixirSense. |
@msaraiva any update on this? |
@khanakia can yo debug it with?
on my machine the sources are in the directory that is returned (I don't use asdf, I build elixir myself)
|
The above path does not exists. But i verified this path exists My binaries are located in this folder
How can I change the path to point the elixir to a new path? |
@lukaszsamson So paths are correct now after I compiled with source. This is the new path it's showing now
But Go to definition still not works as you can see in the attached screenshot |
@lukaszsamson Also i just reinstalled the As https://github.com/elixir-lsp/vscode-elixir-ls required the elixir to be installed using the asdf path. Refer to this issue. elixir-lsp/vscode-elixir-ls#208 Show how did you make it work with the custom build then as vscode extension requires asdf LOL ? |
I have fixed the issue. Here are the steps
|
Must I install elixir via asdf to use this? Im an Intel Mac user, I installed elixir via brew. And i have the same problems that i cant use the Go to Definition function with the VS Code extension |
i tried these steps, however im stucked at step 4, i got the following error after running the command rm -rf ebin |
Can i ask the if go to definition function will only on default function such Currently i can see the definition of IO.inspect, IO.puts etc. But, I have a helper.ex file and when i import it into another file(example, users.ex), i can't see the definition of the functions that is in the helper.ex from the users.ex file, is this normal? |
@Sky0307 the steps i gave once you perform VS Code Go To Definition will work for everything. Regarding helper.ex you cannot inspect because you did not compile the file using elixirc. So there are 2 ways:
|
@khanakia Thanks for your help! I actually created my project with mix. I am an Intel Mac user, I installed both Then, I did the following:
On top of this, I compiled my project with |
Hi there, has anyone figured out how to get the language server to find sources on Windows? I see:
I installed Elixir using the standard installer which puts it in the program files directory (I assume with no source). I'd be happy to manually download the source and configure a pointer to it if that's a possibility. (Note that (Additionally, |
Should
ElixirSense.definition/3
be able to handle modules that are provided with Elixir, likeGenServer
? See https://github.com/balduncle/playground/blob/master/test/playground_test.exs for 3 tests that are currently failing due to the paths to the source files for built in modules not existing on my computer and instead being associated with the machine Elixir was built on. Note that the Enum test comes straight from the docs on hex.Thanks.
The text was updated successfully, but these errors were encountered: