mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-27 21:43:37 +00:00
Merge #4196
4196: Rebuild rust-analyzer when launching in VS Code r=matklad a=jonas-schievink This is usually the right thing, and previously would launch a stale r-a server. Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
This commit is contained in:
commit
0d7c9974b0
3 changed files with 33 additions and 3 deletions
4
.vscode/launch.json
vendored
4
.vscode/launch.json
vendored
|
@ -41,7 +41,7 @@
|
||||||
"outFiles": [
|
"outFiles": [
|
||||||
"${workspaceFolder}/editors/code/out/**/*.js"
|
"${workspaceFolder}/editors/code/out/**/*.js"
|
||||||
],
|
],
|
||||||
"preLaunchTask": "Build Extension",
|
"preLaunchTask": "Build Server and Extension",
|
||||||
"skipFiles": [
|
"skipFiles": [
|
||||||
"<node_internals>/**/*.js"
|
"<node_internals>/**/*.js"
|
||||||
],
|
],
|
||||||
|
@ -62,7 +62,7 @@
|
||||||
"outFiles": [
|
"outFiles": [
|
||||||
"${workspaceFolder}/editors/code/out/**/*.js"
|
"${workspaceFolder}/editors/code/out/**/*.js"
|
||||||
],
|
],
|
||||||
"preLaunchTask": "Build Extension",
|
"preLaunchTask": "Build Server (Release) and Extension",
|
||||||
"skipFiles": [
|
"skipFiles": [
|
||||||
"<node_internals>/**/*.js"
|
"<node_internals>/**/*.js"
|
||||||
],
|
],
|
||||||
|
|
31
.vscode/tasks.json
vendored
31
.vscode/tasks.json
vendored
|
@ -4,7 +4,7 @@
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"tasks": [
|
"tasks": [
|
||||||
{
|
{
|
||||||
"label": "Build Extension",
|
"label": "Build Extension in Background",
|
||||||
"group": "build",
|
"group": "build",
|
||||||
"type": "npm",
|
"type": "npm",
|
||||||
"script": "watch",
|
"script": "watch",
|
||||||
|
@ -15,6 +15,17 @@
|
||||||
},
|
},
|
||||||
"isBackground": true,
|
"isBackground": true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"label": "Build Extension",
|
||||||
|
"group": "build",
|
||||||
|
"type": "npm",
|
||||||
|
"script": "build",
|
||||||
|
"path": "editors/code/",
|
||||||
|
"problemMatcher": {
|
||||||
|
"base": "$tsc",
|
||||||
|
"fileLocation": ["relative", "${workspaceFolder}/editors/code/"]
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"label": "Build Server",
|
"label": "Build Server",
|
||||||
"group": "build",
|
"group": "build",
|
||||||
|
@ -22,5 +33,23 @@
|
||||||
"command": "cargo build --package rust-analyzer",
|
"command": "cargo build --package rust-analyzer",
|
||||||
"problemMatcher": "$rustc"
|
"problemMatcher": "$rustc"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"label": "Build Server (Release)",
|
||||||
|
"group": "build",
|
||||||
|
"type": "shell",
|
||||||
|
"command": "cargo build --release --package rust-analyzer",
|
||||||
|
"problemMatcher": "$rustc"
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"label": "Build Server and Extension",
|
||||||
|
"dependsOn": ["Build Server", "Build Extension"],
|
||||||
|
"problemMatcher": "$rustc"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Build Server (Release) and Extension",
|
||||||
|
"dependsOn": ["Build Server (Release)", "Build Extension"],
|
||||||
|
"problemMatcher": "$rustc"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"vscode:prepublish": "tsc && rollup -c",
|
"vscode:prepublish": "tsc && rollup -c",
|
||||||
"package": "vsce package -o rust-analyzer.vsix",
|
"package": "vsce package -o rust-analyzer.vsix",
|
||||||
|
"build": "tsc",
|
||||||
"watch": "tsc --watch",
|
"watch": "tsc --watch",
|
||||||
"lint": "tsfmt --verify && eslint -c .eslintrc.js --ext ts ./src",
|
"lint": "tsfmt --verify && eslint -c .eslintrc.js --ext ts ./src",
|
||||||
"fix": " tsfmt -r && eslint -c .eslintrc.js --ext ts ./src --fix"
|
"fix": " tsfmt -r && eslint -c .eslintrc.js --ext ts ./src --fix"
|
||||||
|
|
Loading…
Reference in a new issue