Got tasks and launch setup all gucci, and the error squiggle goes to the end ofthe line now 👌

This commit is contained in:
Noah Santschi-Cooney 2018-06-12 23:49:52 +01:00
parent fef2130bb9
commit 8c3f0e3e2c
No known key found for this signature in database
GPG key ID: 3B22282472C8AE48
4 changed files with 57 additions and 77 deletions

2
.vscode/launch.json vendored
View file

@ -11,7 +11,7 @@
"stopOnEntry": false,
"sourceMaps": true,
"outFiles": ["${workspaceRoot}/client/out/**/*.js"],
//"preLaunchTask": "npm: watch:client"
"preLaunchTask": "watch"
},
{
"type": "node",

129
.vscode/tasks.json vendored
View file

@ -1,75 +1,56 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "compile",
"dependsOn": [
"compile:client",
"compile:server"
],
"problemMatcher": []
},
{
"type": "npm",
"script": "compile:client",
"group": "build",
"presentation": {
"panel": "dedicated",
"reveal": "never"
},
"problemMatcher": [
"$tsc"
]
},
{
"type": "npm",
"script": "compile:server",
"group": "build",
"presentation": {
"panel": "dedicated",
"reveal": "never"
},
"problemMatcher": [
"$tsc"
]
},
{
"label": "watch",
"dependsOn": [
"watch:client",
"watch:server"
],
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": []
},
{
"type": "npm",
"script": "watch:client",
"isBackground": true,
"group": "build",
"presentation": {
"panel": "dedicated",
"reveal": "never"
},
"problemMatcher": [
"$tsc-watch"
]
},
{
"type": "npm",
"script": "watch:server",
"isBackground": true,
"group": "build",
"presentation": {
"panel": "dedicated",
"reveal": "never"
},
"problemMatcher": [
"$tsc-watch"
]
}
]
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "compile",
"problemMatcher": [
"$tsc"
]
},
{
"type": "npm",
"script": "compile:client",
"problemMatcher": [
"$tsc"
]
},
{
"type": "npm",
"script": "compile:server",
"problemMatcher": [
"$tsc"
]
},
{
"type": "npm",
"script": "watch:client",
"isBackground": true,
"problemMatcher": [
"$tsc-watch"
]
},
{
"type": "npm",
"script": "watch:server",
"isBackground": true,
"presentation": {
"reveal": "never",
"panel": "dedicated"
},
"problemMatcher": [
"$tsc-watch"
]
},
{
"label": "watch",
"isBackground": true,
"dependsOn": [
"npm: watch:server",
"npm: watch:client"
]
}
]
}

View file

@ -67,7 +67,6 @@
"vscode:prepublish": "cd client && npm run update-vscode && cd .. && npm run compile",
"postinstall": "cd server && npm install && cd ../client && npm install && cd ..",
"compile": "npm run compile:client && npm run compile:server",
"run": "concurrently \"npm run watch:client\" \"npm run watch:server\"",
"compile:client": "tsc -p ./client/tsconfig.json",
"compile:server": "tsc -p ./server/tsconfig.json",
"watch:client": "tsc -w -p ./client/tsconfig.json",

View file

@ -82,7 +82,7 @@ function lint(text: string, uri: string) {
function calcRange(lineNum: number, uri: string): Range {
const line = documents.get(uri).getText().split('\n')[lineNum - 1]
return Range.create(lineNum - 1, line.length - line.leftTrim().length, lineNum - 1, prepareLine(line).length)
return Range.create(lineNum - 1, line.length - line.leftTrim().length, lineNum - 1, prepareLine(line).length + 1)
}
function prepareLine(line: string): string {