-
Notifications
You must be signed in to change notification settings - Fork 520
Open
Labels
Description
Currently main.ts
is mostly populated with this mystifying code blob:
Lines 53 to 104 in 6c96a2d
vscode.languages.setLanguageConfiguration( | |
PowerShellLanguageId, | |
{ | |
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\=\+\[\{\]\}\\\|\;\'\"\,\.\<\>\/\?\s]+)/g, | |
indentationRules: { | |
// ^(.*\*/)?\s*\}.*$ | |
decreaseIndentPattern: /^(.*\*\/)?\s*\}.*$/, | |
// ^.*\{[^}"']*$ | |
increaseIndentPattern: /^.*\{[^}"']*$/, | |
}, | |
comments: { | |
lineComment: "#", | |
blockComment: ["<#", "#>"], | |
}, | |
brackets: [ | |
["{", "}"], | |
["[", "]"], | |
["(", ")"], | |
], | |
onEnterRules: [ | |
{ | |
// e.g. /** | */ | |
beforeText: /^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/, | |
afterText: /^\s*\*\/$/, | |
action: { indentAction: vscode.IndentAction.IndentOutdent, appendText: " * " }, | |
}, | |
{ | |
// e.g. /** ...| | |
beforeText: /^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/, | |
action: { indentAction: vscode.IndentAction.None, appendText: " * " }, | |
}, | |
{ | |
// e.g. * ...| | |
beforeText: /^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/, | |
action: { indentAction: vscode.IndentAction.None, appendText: "* " }, | |
}, | |
{ | |
// e.g. */| | |
beforeText: /^(\t|(\ \ ))*\ \*\/\s*$/, | |
action: { indentAction: vscode.IndentAction.None, removeText: 1 }, | |
}, | |
{ | |
// e.g. *-----*/| | |
beforeText: /^(\t|(\ \ ))*\ \*[^/]*\*\/\s*$/, | |
action: { indentAction: vscode.IndentAction.None, removeText: 1 }, | |
}, | |
], | |
}); |
It seems to have some PowerShell related bits in it, but also some JS doc comment stuff...
It probably shouldn't be in main.ts
, and we should work out if it even causes anything. I suspect it's getting ignored in favour of the code in https://github.com/Microsoft/vscode/blob/master/extensions/powershell/language-configuration.json.
We should investigate and:
- if the code here is being preferred, move it to a more sensible location in the repo and make sure it's up to do
- if the VSCode JSON is being preferred, delete this code