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 option to show implicit methods and classes #447

Merged
merged 3 commits into from
Nov 20, 2020

Conversation

tgodzik
Copy link
Contributor

@tgodzik tgodzik commented Nov 16, 2020

Follow up after scalameta/metals#2232

package.json Outdated Show resolved Hide resolved
Copy link
Member

@ckipp01 ckipp01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

@tgodzik
Copy link
Contributor Author

tgodzik commented Nov 18, 2020

I added an option to toggle the option on and off, which might be useful to users. I will need to do a small change in the server too.

@@ -656,6 +656,14 @@ function launchMetals(
});
});

registerCommand("metals.toggle-implicit-conversions-and-classes", () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm trying to think if this will be used by any other editors that may use metals-languageclient. Do you think we should add this there, or is this probably pretty VS Cod specfic?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think currently it's pretty much VS Code specific, it could be useful in cases that we show decorations, but emacs does not used the language client

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For hovers, it will just start working with the next hover.

@tgodzik tgodzik requested a review from gabro November 19, 2020 11:01
const config = workspace.getConfiguration("metals");
const configProperty = config.inspect<boolean>(setting);
const currentValues = configProperty?.workspaceValue ?? false;
config.update(setting, !currentValues, ConfigurationTarget.Workspace);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gabro I set it to use workspace by default, I think it makes sense for toggle. What do you think?

@tgodzik tgodzik merged commit 2ab2c22 into scalameta:master Nov 20, 2020
@tgodzik tgodzik deleted the add-implicit-conversions-opt branch November 20, 2020 16:12
kasiaMarek pushed a commit to kasiaMarek/metals-vscode that referenced this pull request Mar 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants