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

support workspace configurations #2701

Merged
merged 3 commits into from
Aug 31, 2018
Merged

support workspace configurations #2701

merged 3 commits into from
Aug 31, 2018

Conversation

akosyakov
Copy link
Member

@akosyakov akosyakov commented Aug 29, 2018

Fix #1575, fix #1674

TODO:

@@ -0,0 +1,107 @@
/********************************************************************************
* Copyright (C) 2017 Ericsson and others.
Copy link
Member Author

Choose a reason for hiding this comment

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

Typefox, 2018

@akosyakov akosyakov force-pushed the GH-1575 branch 3 times, most recently from 266a16c to c22cd84 Compare August 30, 2018 09:32
@akosyakov akosyakov requested a review from svenefftinge August 30, 2018 09:33
@akosyakov akosyakov changed the title WIP support workspace configurations support workspace configurations Aug 30, 2018
@akosyakov akosyakov force-pushed the GH-1575 branch 4 times, most recently from 93976fe to dba4394 Compare August 30, 2018 12:33
@akosyakov
Copy link
Member Author

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.

Copy link
Contributor

@svenefftinge svenefftinge left a 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);
Copy link
Contributor

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?

Copy link
Member Author

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;
Copy link
Contributor

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.

Copy link
Member Author

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.

Copy link
Member Author

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

@akosyakov akosyakov force-pushed the GH-1575 branch 3 times, most recently from 9e303c7 to 33fd479 Compare August 30, 2018 14:54
@akosyakov
Copy link
Member Author

@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>
@svenefftinge
Copy link
Contributor

Yes, please do.

@akosyakov akosyakov merged commit 8aa64f4 into master Aug 31, 2018
@akosyakov akosyakov deleted the GH-1575 branch August 31, 2018 06:27
@simark
Copy link
Contributor

simark commented Sep 4, 2018

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'
Copy link
Contributor

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.

Copy link
Member Author

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

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.

LSP tracing configuration [lsp] Support workspace configurations
3 participants