Skip to content

Commit

Permalink
Merge pull request #121 from tgodzik/add-hline-support
Browse files Browse the repository at this point in the history
Automatically add | when using multiline strings
  • Loading branch information
tgodzik authored Jun 21, 2019
2 parents e3db271 + 537e2ed commit 97a62c1
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,13 @@ function fetchAndLaunchMetals(context: ExtensionContext, javaHome: string) {
"sonatype:snapshots",
"-p"
]),
{ env: { COURSIER_NO_TERM: "true", ...customRepositoriesEnv, ...process.env } }
{
env: {
COURSIER_NO_TERM: "true",
...customRepositoriesEnv,
...process.env
}
}
);
const title = `Downloading Metals v${serverVersion}`;
trackDownloadProgress(title, outputChannel, fetchProcess).then(
Expand Down Expand Up @@ -370,7 +376,9 @@ function launchMetals(
});

window.onDidChangeWindowState(windowState => {
client.sendNotification(MetalsWindowStateDidChange.type, { focused: windowState.focused })
client.sendNotification(MetalsWindowStateDidChange.type, {
focused: windowState.focused
});
});

client.onRequest(MetalsInputBox.type, (options, requestToken) => {
Expand Down Expand Up @@ -489,6 +497,11 @@ function enableScaladocIndentation() {
afterText: /^\s*\*\/$/,
action: { indentAction: IndentAction.IndentOutdent, appendText: " * " }
},
{
// e.g. |
beforeText: /^(\s*\|.*|.*"""\|)$/,
action: { indentAction: IndentAction.Indent, appendText: "|" }
},
{
// e.g. /** ...|
beforeText: /^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,
Expand Down

0 comments on commit 97a62c1

Please sign in to comment.