Skip to content
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

Missing Reference using DrWatson #1238

Open
arnold-c opened this issue Sep 4, 2023 · 0 comments
Open

Missing Reference using DrWatson #1238

arnold-c opened this issue Sep 4, 2023 · 0 comments

Comments

@arnold-c
Copy link

arnold-c commented Sep 4, 2023

I use DrWatson to manage most of my projects. I've noticed that the language server does not recognize DrWatson functions, and therefore I cannot use the helper functions for relative paths etc, meaning features like "go to definition" do not work.

The basic structure is that there are multiple directories, and functions are typically placed in the src/ directory, with scripts in the scripts/ directory.

In the below example, there is a file src/my-functions.jl that contains foo() = println("bar")

# Activate project "Test" using DrWatson
using DrWatson 
quickactivate("Test")

include("../src/my-functions.jl")

foo()

julia> bar

This does not work

# Activate project "Test" using DrWatson
using DrWatson
quickactivate("Test")

include(srcdir("my-functions.jl"))            # Missing reference: srcdir

foo()

julia> bar

In this example, it's not too hard to just use relative paths, but there are certainly times when this would be unwieldy. I get the same issue when using both NeoVim and VSCode.

I have no idea how LSPs work (in general, or in this case), but if you think it's a somewhat simple fix and could point me in the right direction I'm happy to have a go!

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant