forked from DotJoshJohnson/vscode-xml
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding to DotJoshJohnson#6 - user setting to persist the last query
- Loading branch information
Showing
1 changed file
with
6 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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
b668ab4
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 reads an user setting
xmlTools.PersistXPathQuery
to determine whether to save the XPath query. However, the setting needs to be set by the user explicitely, they suggest using theExtensionContext
instead. Any thought on which way to approach?b668ab4
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.
In addition to DotJoshJohnson#4
b668ab4
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.
Using the
workspace.getConfiguration()
API as you did here to get the setting should be just fine. We will, however, need to define the setting in thecontributes
property ofpackage.json
. This will add the setting upon installation of the extension (along with a default value), which eliminates the need for users to manually specify the setting in their override file. For example:b668ab4
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 the link, fixed this one as well.