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

Add support for rust-analyzer via rust-project.json #7

Open
chmp opened this issue Aug 31, 2020 · 1 comment
Open

Add support for rust-analyzer via rust-project.json #7

chmp opened this issue Aug 31, 2020 · 1 comment

Comments

@chmp
Copy link
Owner

chmp commented Aug 31, 2020

With a rust-project.json file rust-analyzer should be able to handle cargo-wop projects. The format is documented here.

@chmp
Copy link
Owner Author

chmp commented Mar 25, 2021

Get the current sysroot using rustc --print sysroot and append lib/rustlib/src/rust/library

The .vscode/settings.json file should read:

{
    "rust-analyzer.linkedProjects": [
        {
            "sysroot_src": "$(rustc --print sysroot)/lib/rustlib/src/rust/library",
            "crates": [
                {
                    "root_module": "$file",
                    "edition": "2018",
                    "deps": [],
                },
            ]
        }
    ]
}

however deps are missing + normal crates are no longer detected.

Alternative use path generated manifest:

{
    "rust-analyzer.linkedProjects": [
        "path from $(cargo wop locate-project $file)"
    ]
}

however, this also does not seem to work.

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