-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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 workspace configurations #2701
Conversation
@@ -0,0 +1,107 @@ | |||
/******************************************************************************** | |||
* Copyright (C) 2017 Ericsson and others. |
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.
Typefox, 2018
266a16c
to
c22cd84
Compare
93976fe
to
dba4394
Compare
Please review, you can test it with JSON language, try to disable/enabled formatting via the preference widget and see whether you can format or not. Please consider the case with defaults settings, it should work as well. |
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.
LGTM
if (this.toDispose.disposed) { | ||
return; | ||
} | ||
this.providers.push(...providers); |
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.
Shouldn't we rather set a new array instead of mutating an existing one?
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.
when we will miss a schema based provider which is registered in postConstruct
callback to provide default values
|
||
@inject(PreferenceSchemaProvider) | ||
protected readonly schema: PreferenceSchemaProvider; | ||
|
||
@inject(PreferenceProviders) | ||
protected readonly getPreferenceProvider: PreferenceProviders; |
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.
we should use the targetName
annotation instead of the PreferenceProviders
function.
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.
it is to overcome: inversify/InversifyJS#853
One cannot rebind named bindings.
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.
we cannot remove it also because we need to load providers lazily, injecting them breaks DI, i've added a comment
9e303c7
to
33fd479
Compare
@svenefftinge I've addressed your comments, good to merge if green? |
Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
Yes, please do. |
About the JSON preferences to control the language server setting, is there some documentation about what options are available? In particular, I'm interested about #1674, to see what happens with clangd in a gitpod container. |
'verbose' | ||
], | ||
'default': 'off', | ||
'description': 'Enable/disable default JSON formatter' |
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.
There is a copy paste error here.
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 for spotting, I've fixed it here: #2742
Fix #1575, fix #1674
TODO: