Enable environment variables with clang_format_path.#2380
Merged
sean-mcmanus merged 5 commits intoAug 15, 2018
mastermicrosoft/vscode-cpptools:masterfrom
seanmcm/fixClangFormatEnvmicrosoft/vscode-cpptools:seanmcm/fixClangFormatEnvCopy head branch name to clipboard
Merged
Enable environment variables with clang_format_path.#2380sean-mcmanus merged 5 commits intomastermicrosoft/vscode-cpptools:masterfrom seanmcm/fixClangFormatEnvmicrosoft/vscode-cpptools:seanmcm/fixClangFormatEnvCopy head branch name to clipboard
sean-mcmanus merged 5 commits into
mastermicrosoft/vscode-cpptools:masterfrom
seanmcm/fixClangFormatEnvmicrosoft/vscode-cpptools:seanmcm/fixClangFormatEnvCopy head branch name to clipboard
Conversation
…oft/vscode-cpptools into seanmcm/fixClangFormatEnv
bobbrow
requested changes
Aug 13, 2018
| ], | ||
| "default": null, | ||
| "description": "The full path of the clang-format executable.", | ||
| "description": "The full path of the clang-format executable. Changing this setting requires a Reload Window if it contains environment variables.", |
Member
There was a problem hiding this comment.
did it not work to intercept the didChangeConfigurations message in protocallFilter.ts?
Contributor
Author
There was a problem hiding this comment.
I didn't investigate that. I can.
Contributor
Author
There was a problem hiding this comment.
It doesn't appear possible to "replace" a setting in that filter, but I can change it to ignore that particular setting change and send our own message with the correct setting.
Member
There was a problem hiding this comment.
Yes, I think that would be better. Thanks!
bobbrow
requested changes
Aug 14, 2018
| } | ||
| if (changedSettings["clang_format_path"]) { | ||
| let settings: CppSettings = new CppSettings(this.RootUri); | ||
| this.languageClient.sendNotification(UpdateClangFormatPathNotification, util.resolveVariables(settings.clangFormatPath, null)); |
Member
There was a problem hiding this comment.
Can you just use changedSettings["clang_format_path"] without creating a new CppSettings object?
Contributor
Author
There was a problem hiding this comment.
No, the value is "...".
bobbrow
approved these changes
Aug 14, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For #2344 .