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

display build target info #660

Merged
merged 6 commits into from
Feb 7, 2022

Conversation

Arthurm1
Copy link
Contributor

@Arthurm1 Arthurm1 commented Aug 30, 2021

src/treeview.ts Outdated
@@ -191,6 +191,7 @@ class MetalsTreeDataProvider implements TreeDataProvider<string> {
? Uri.parse(item.nodeUri)
: undefined,
collapsibleState: toTreeItemCollapsibleState(item.collapseState),
contextValue: item.contextValue,
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this needed in the protocol or can be handle it on the vs code side?

src/treeview.ts Outdated
@@ -191,6 +191,7 @@ class MetalsTreeDataProvider implements TreeDataProvider<string> {
? Uri.parse(item.nodeUri)
: undefined,
collapsibleState: toTreeItemCollapsibleState(item.collapseState),
contextValue: item.contextValue,
Copy link
Contributor

Choose a reason for hiding this comment

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

MAybe:

Suggested change
contextValue: item.contextValue,
contextValue: if (item.nodeUri.startsWith(projects:) && item.nodeUri.contains("_root_")) "projects" else undefined,

Something along these lines? (though that is Scala code 😅 )

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You suggestion worked. I've made the change. Adding contextValue to the API is no longer needed.

@tgodzik
Copy link
Contributor

tgodzik commented Jan 31, 2022

Languageclient has been released https://github.com/scalameta/metals-languageclient/releases/tag/v0.5.8 🎉

src/goToLocation.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@tgodzik tgodzik left a comment

Choose a reason for hiding this comment

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

Let's bump to newest snapshot once https://github.com/scalameta/metals/actions/runs/1806111245 is released and resolve conflicts.

@kpodsiad
Copy link
Member

kpodsiad commented Feb 7, 2022

I bumped snapshot version in #836 - there is no need to do this here anymore.

Copy link
Member

@kpodsiad kpodsiad left a comment

Choose a reason for hiding this comment

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

Awesome stuff @Arthurm1!
I wanted this feature so badly that I've resolved conflict myself, hope you don't mind ;)

@kpodsiad kpodsiad merged commit 4f34420 into scalameta:main Feb 7, 2022
@Arthurm1
Copy link
Contributor Author

Arthurm1 commented Feb 7, 2022

@kpodsiad No problem - thanks

@Arthurm1 Arthurm1 deleted the display_build_target_info branch February 7, 2022 20:22
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

Successfully merging this pull request may close these issues.

None yet

3 participants