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
Hover help doesn't show for own modules #2719
Comments
It seems likely that |
I am indeed using the LOAD_PATH method to make use of my own module. Is there anything wrong with this? And what is the main stream method to make use of custom modules? |
There's not really anything wrong with this per se, it's just that the extension cannot reason about LOAD_PATH modifications (currently, but there are no concrete plans either). I'd typically recommend using a local environment and |
One solution that i finded for getting vs-code intellisense to work for files that are in the same julia env but not directly included in the package entry point is just to add a if false statement including that file, for example: Imagine that i created a # inside src/Example.jl
if (false) include("../examples/example.jl") end If you dont like to use if statement, you can also create an macro ignore(args...) end And then: # inside src/Example.jl
@ignore include("../examples/example.jl") This solution is not perfect, as you have to add this "false" include every time for every file you want intellisense to work, and also every symbol for your package will be visible, not just the Indeed, a better solution would be to the julia extension to do this automatically for every |
This would be extremely useful to have. When writing tests for a module, hover help doesn't work at all, since it's not aware of the tested module. @jorge-brito thanks for this very clever solution. This is indeed a workaround for using hover help inside tests: # <src/MainModule.jl>
...
macro ignore(args...) end
@ignore include("../test/runtests.jl")
... |
Issue is as stated above. When hovering over my functions which are imported through my module the hover help doesn't show and I can't fast click towards the function itself in my module file. But when I do the same in the module file it works fine.
So for example:
using TestModule
a = TestFunction(3) # Hovering over TestFunction doesn't do anything and I can't fastclick
but
module TestModule
export TestFunction # Hovering over TestFunction shows function details and I can fastclick
function TestFunction(var)
return var
end
end
How could this be resolved?
I am using v1.5.10 of Julia for vscode
v1.6.5 of the Julia programming language
The text was updated successfully, but these errors were encountered: