Skip to content

Commit

Permalink
Improve Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
RedCMD committed Sep 28, 2024
1 parent 62b1cad commit cf3196f
Show file tree
Hide file tree
Showing 6 changed files with 131 additions and 184 deletions.
32 changes: 16 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,22 @@
"editor.defaultFormatter": "RedCMD.tmlanguage-syntax-highlighter"
}
},
"configuration": [
{
"title": "JSON TextMate",
"properties": {
"tmlanguage-syntax-highlighter.formattingStyle": {
"type": "string",
"enum": [
"tight",
"default"
],
"default": "default",
"scope": "resource"
}
}
}
],
"jsonLanguageParticipants": [
{
"languageId": "json-textmate"
Expand Down Expand Up @@ -346,22 +362,6 @@
"category": "TextMate",
"icon": "$(inspect)"
}
],
"configuration": [
{
"title": "TextMate Syntax Highlighting and Intellisense",
"properties": {
"tmlanguage-syntax-highlighter.formattingStyle": {
"type": "string",
"enum": [
"tight",
"default"
],
"default": "default",
"scope": "resource"
}
}
}
]
},
"dependencies": {
Expand Down
8 changes: 1 addition & 7 deletions src/DiagnosticCollection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,7 @@ function Diagnostics(document: vscode.TextDocument) {
continue;
}
diagnostic = {
range:
type == ',' ?
new vscode.Range(
toPosition(node.previousSibling.endPosition),
toPosition(node.previousSibling.endPosition),
)
: range,
range: toRange(node.previousSibling.endPosition, node.previousSibling.endPosition),
message: `'${parentType}' is missing character${type.length > 1 ? 's' : ''} '${type}'`,
severity: vscode.DiagnosticSeverity.Error,
source: 'TreeSitter',
Expand Down
Loading

0 comments on commit cf3196f

Please sign in to comment.