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

Attach sources #12

Open
olafurpg opened this issue Feb 8, 2019 · 1 comment
Open

Attach sources #12

olafurpg opened this issue Feb 8, 2019 · 1 comment

Comments

@olafurpg
Copy link
Member

olafurpg commented Feb 8, 2019

IntelliJ has a nice feature "Attach sources..." that makes it possible to manually provide a jar/zip/directory with source code when there are no sources for a library dependency.

screenshot 2019-02-08 at 12 22 23

Metals could support the same feature via the workspace/didChangeConfiguration notifications.

{
  "metals": {
    "attachedSources": [
      "/path/to/sources.jar"
    ]
  }
}

By default, users would be able to manually list the sources in a JSON file while in editors like VS Code the Metals extension could expose a command to open a file picker UI and automatically update the config on behalf of the user.

A workaround for now is to manually edit the Bloop JSON files to add new objects to the resolution.modules key with a classifier: sources field.

screenshot 2019-02-08 at 12 14 23

@hartmut27
Copy link

just for reference and brainstorming: automatically attach souces
this lets me omit the tedious step of manually attaching sources, since source jars from the libraries are automatically referenced in the project then.

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

2 participants