-
Notifications
You must be signed in to change notification settings - Fork 74
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
Support synthetic decorations in worksheets #862
Conversation
Previously, we would have a separate type of decorations for worksheets. Now, we have a separate type for worksheets evaluations and synthetic decorations. Needed for scalameta/metals#3582
@@ -1068,9 +1066,6 @@ function launchMetals( | |||
scalaDebugger.initialize(outputChannel).forEach((disposable) => { | |||
context.subscriptions.push(disposable); | |||
}); | |||
client.onNotification(DecorationTypeDidChange.type, (options) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is never used and not sure if it actually should.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd love to see some refactor which will reduce extension.ts
size, but it isn't obligatory ;)
src/extension.ts
Outdated
client.onNotification(DecorationsRangesDidChange.type, (params) => { | ||
const editors = window.visibleTextEditors; | ||
const path = Uri.parse(params.uri).toString(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've noticed that client.onNotification
return Disposable
but we're discarding returned value. Maybe it should be added to context.subscriptions
(yeah, it's a broader problem)
extension.ts
is a very large file, I wonder if we can e.g. create notifications
dir and extract all client.onNotification
to different files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added all the disposables from onNotification
to subscriptions. Good idea!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, that's a step into good direction ;)
Previously, we would have a separate type of decorations for worksheets. Now, we have a separate type for worksheets evaluations and synthetic decorations.
Needed for scalameta/metals#3582