Skip to content

Commit

Permalink
Renaming setting names
Browse files Browse the repository at this point in the history
  • Loading branch information
mjbvz committed Sep 10, 2019
1 parent 728ee3a commit 28c5988
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 12 deletions.
10 changes: 5 additions & 5 deletions extensions/markdown-language-features/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -269,18 +269,18 @@
"%configuration.markdown.preview.openMarkdownLinks.inEditor%"
]
},
"markdown.editor.openMarkdownLinks": {
"markdown.links.openLocation": {
"type": "string",
"default": "currentGroup",
"description": "%configuration.markdown.editor.openMarkdownLinks.description%",
"description": "%configuration.markdown.links.openLocation.description%",
"scope": "resource",
"enum": [
"currentGroup",
"openToSide"
"beside"
],
"enumDescriptions": [
"%configuration.markdown.editor.openMarkdownLinks.inCurrentGroup%",
"%configuration.markdown.editor.openMarkdownLinks.openToSide%"
"%configuration.markdown.links.openLocation.currentGroup%",
"%configuration.markdown.links.openLocation.beside%"
]
},
"markdown.trace": {
Expand Down
8 changes: 4 additions & 4 deletions extensions/markdown-language-features/package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
"markdown.trace.desc": "Enable debug logging for the markdown extension.",
"markdown.preview.refresh.title": "Refresh Preview",
"markdown.preview.toggleLock.title": "Toggle Preview Locking",
"configuration.markdown.preview.openMarkdownLinks.description": "How should clicking on links to markdown files be handled in the preview.",
"configuration.markdown.preview.openMarkdownLinks.description": "Controls how links to other markdown files in the markdown preview should be opened.",
"configuration.markdown.preview.openMarkdownLinks.inEditor": "Try to open links in the editor",
"configuration.markdown.preview.openMarkdownLinks.inPreview": "Try to open links in the markdown preview",
"configuration.markdown.editor.openMarkdownLinks.description": "How following links to markdown files be handled in the editor.",
"configuration.markdown.editor.openMarkdownLinks.inCurrentGroup": "Try to open links in the current editor group",
"configuration.markdown.editor.openMarkdownLinks.openToSide": "Try to open links to the Side"
"configuration.markdown.links.openLocation.description": "Controls where links in markdown files should be opened.",
"configuration.markdown.links.openLocation.currentGroup": "Open links in the active editor group.",
"configuration.markdown.links.openLocation.beside": "Open links beside the active editor."
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ export interface OpenDocumentLinkArgs {
fragment: string;
}

enum OpenMarkdownLinks {
beside = 'beside',
currentGroup = 'currentGroup',
}

export class OpenDocumentLinkCommand implements Command {
private static readonly id = '_markdown.openDocumentLink';
public readonly id = OpenDocumentLinkCommand.id;
Expand Down Expand Up @@ -61,11 +66,11 @@ export class OpenDocumentLinkCommand implements Command {

private getViewColumn(resource: vscode.Uri): vscode.ViewColumn {
const config = vscode.workspace.getConfiguration('markdown', resource);
const openLinks = config.get<string>('editor.openMarkdownLinks', 'currentGroup');
const openLinks = config.get<OpenMarkdownLinks>('links.openLocation', OpenMarkdownLinks.currentGroup);
switch (openLinks) {
case 'openToSide':
case OpenMarkdownLinks.beside:
return vscode.ViewColumn.Beside;
case 'currentGroup':
case OpenMarkdownLinks.currentGroup:
default:
return vscode.ViewColumn.Active;
}
Expand Down

0 comments on commit 28c5988

Please sign in to comment.