Skip to content

Commit

Permalink
Fix #182 Set section name for workspace/configuration
Browse files Browse the repository at this point in the history
Signed-off-by: Remy Suen <[email protected]>
  • Loading branch information
rcjsuen committed Oct 23, 2017
1 parent 7d1599b commit c0d0d7a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ All notable changes to this project will be documented in this file.
- create docker.command.flagToChown to convert an unknown ADD or COPY flag to a --chown ([#187](https://github.com/rcjsuen/dockerfile-language-server-nodejs/issues/187))
### Fixed
- use a reasonable range for the diagnostic if an unknown flag has no name ([#186](https://github.com/rcjsuen/dockerfile-language-server-nodejs/issues/186))
- specify a section name when sending a workspace/configuration request ([#182](https://github.com/rcjsuen/dockerfile-language-server-nodejs/issues/182))

## [0.0.9] - 2017-10-14
### Added
Expand Down
4 changes: 2 additions & 2 deletions src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ function getSeverity(severity: string | undefined): ValidationSeverity | null {
function getConfiguration(resource: string): Thenable<ValidatorConfiguration> {
let result = validatorConfigurations.get(resource);
if (!result) {
result = connection.workspace.getConfiguration({ section: '', scopeUri: resource });
result = connection.workspace.getConfiguration({ section: "docker.languageserver.diagnostics", scopeUri: resource });
validatorConfigurations.set(resource, result);
}
return result;
Expand All @@ -235,7 +235,7 @@ function refreshConfigurations() {
// store all the URIs that need to be refreshed
const settingsRequest: ConfigurationItem[] = [];
for (let uri in documents) {
settingsRequest.push({ section: "", scopeUri: uri });
settingsRequest.push({ section: "docker.languageserver.diagnostics", scopeUri: uri });
}
// clear the cache
validatorConfigurations.clear();
Expand Down

0 comments on commit c0d0d7a

Please sign in to comment.