diff options
Diffstat (limited to '.vscode')
-rw-r--r-- | .vscode/extensions.json | 9 | ||||
-rw-r--r-- | .vscode/launch.json | 340 | ||||
-rw-r--r-- | .vscode/tasks.json | 47 |
3 files changed, 396 insertions, 0 deletions
diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 000000000..027eeabc4 --- /dev/null +++ b/.vscode/extensions.json | |||
@@ -0,0 +1,9 @@ | |||
1 | { | ||
2 | // See http://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations. | ||
3 | // Extension identifier format: ${publisher}.${name}. Example: vscode.csharp | ||
4 | |||
5 | // List of extensions which should be recommended for users of this workspace. | ||
6 | "recommendations": ["vadimcn.vscode-lldb"], | ||
7 | // List of extensions recommended by VS Code that should not be recommended for users of this workspace. | ||
8 | "unwantedRecommendations": [] | ||
9 | } | ||
diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 000000000..9aafc8bd3 --- /dev/null +++ b/.vscode/launch.json | |||
@@ -0,0 +1,340 @@ | |||
1 | { | ||
2 | // Use IntelliSense to learn about possible attributes. | ||
3 | // Hover to view descriptions of existing attributes. | ||
4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
5 | "version": "0.2.0", | ||
6 | "configurations": [ | ||
7 | { | ||
8 | "name": "Debug Extension", | ||
9 | "type": "extensionHost", | ||
10 | "request": "launch", | ||
11 | "runtimeExecutable": "${execPath}", | ||
12 | "args": [ | ||
13 | "--extensionDevelopmentPath=${workspaceFolder}/editors/code", | ||
14 | "--disable-extensions" | ||
15 | ], | ||
16 | "env": { | ||
17 | "__RA_LSP_SERVER_DEBUG": "${workspaceFolder}/target/debug/ra_lsp_server" | ||
18 | }, | ||
19 | "outFiles": ["${workspaceFolder}/editors/code/out/**/*.js"], | ||
20 | "preLaunchTask": "Build All" | ||
21 | }, | ||
22 | { | ||
23 | "name": "Debug Lsp Server", | ||
24 | "type": "lldb", | ||
25 | "request": "attach", | ||
26 | "program": "${workspaceFolder}/target/debug/ra_lsp_server", | ||
27 | "pid": "${command:pickMyProcess}", | ||
28 | "sourceLanguages": ["rust"] | ||
29 | }, | ||
30 | { | ||
31 | "type": "lldb", | ||
32 | "request": "launch", | ||
33 | "name": "Debug unit tests in library 'gen_lsp_server'", | ||
34 | "cargo": { | ||
35 | "args": ["test", "--no-run", "--lib", "--package=gen_lsp_server"], | ||
36 | "filter": { | ||
37 | "kind": "lib" | ||
38 | } | ||
39 | }, | ||
40 | "args": [], | ||
41 | "cwd": "${workspaceFolder}" | ||
42 | }, | ||
43 | { | ||
44 | "type": "lldb", | ||
45 | "request": "launch", | ||
46 | "name": "Debug unit tests in library 'ra_analysis'", | ||
47 | "cargo": { | ||
48 | "args": ["test", "--no-run", "--lib", "--package=ra_analysis"], | ||
49 | "filter": { | ||
50 | "kind": "lib" | ||
51 | } | ||
52 | }, | ||
53 | "args": [], | ||
54 | "cwd": "${workspaceFolder}" | ||
55 | }, | ||
56 | { | ||
57 | "type": "lldb", | ||
58 | "request": "launch", | ||
59 | "name": "Debug test 'tests'", | ||
60 | "cargo": { | ||
61 | "args": ["build", "--test=tests", "--package=ra_analysis"], | ||
62 | "filter": { | ||
63 | "kind": "bin" | ||
64 | } | ||
65 | }, | ||
66 | "args": [], | ||
67 | "cwd": "${workspaceFolder}" | ||
68 | }, | ||
69 | { | ||
70 | "type": "lldb", | ||
71 | "request": "launch", | ||
72 | "name": "Debug unit tests in test 'tests'", | ||
73 | "cargo": { | ||
74 | "args": ["test", "--no-run", "--test=tests", "--package=ra_analysis"], | ||
75 | "filter": { | ||
76 | "kind": "bin" | ||
77 | } | ||
78 | }, | ||
79 | "args": [], | ||
80 | "cwd": "${workspaceFolder}" | ||
81 | }, | ||
82 | { | ||
83 | "type": "lldb", | ||
84 | "request": "launch", | ||
85 | "name": "Debug unit tests in library 'ra_hir'", | ||
86 | "cargo": { | ||
87 | "args": ["test", "--no-run", "--lib", "--package=ra_hir"], | ||
88 | "filter": { | ||
89 | "kind": "lib" | ||
90 | } | ||
91 | }, | ||
92 | "args": [], | ||
93 | "cwd": "${workspaceFolder}" | ||
94 | }, | ||
95 | { | ||
96 | "type": "lldb", | ||
97 | "request": "launch", | ||
98 | "name": "Debug unit tests in library 'ra_db'", | ||
99 | "cargo": { | ||
100 | "args": ["test", "--no-run", "--lib", "--package=ra_db"], | ||
101 | "filter": { | ||
102 | "kind": "lib" | ||
103 | } | ||
104 | }, | ||
105 | "args": [], | ||
106 | "cwd": "${workspaceFolder}" | ||
107 | }, | ||
108 | { | ||
109 | "type": "lldb", | ||
110 | "request": "launch", | ||
111 | "name": "Debug unit tests in library 'ra_editor'", | ||
112 | "cargo": { | ||
113 | "args": ["test", "--no-run", "--lib", "--package=ra_editor"], | ||
114 | "filter": { | ||
115 | "kind": "lib" | ||
116 | } | ||
117 | }, | ||
118 | "args": [], | ||
119 | "cwd": "${workspaceFolder}" | ||
120 | }, | ||
121 | { | ||
122 | "type": "lldb", | ||
123 | "request": "launch", | ||
124 | "name": "Debug unit tests in library 'ra_syntax'", | ||
125 | "cargo": { | ||
126 | "args": ["test", "--no-run", "--lib", "--package=ra_syntax"], | ||
127 | "filter": { | ||
128 | "kind": "lib" | ||
129 | } | ||
130 | }, | ||
131 | "args": [], | ||
132 | "cwd": "${workspaceFolder}" | ||
133 | }, | ||
134 | { | ||
135 | "type": "lldb", | ||
136 | "request": "launch", | ||
137 | "name": "Debug test 'test'", | ||
138 | "cargo": { | ||
139 | "args": ["build", "--test=test", "--package=ra_syntax"], | ||
140 | "filter": { | ||
141 | "kind": "bin" | ||
142 | } | ||
143 | }, | ||
144 | "args": [], | ||
145 | "cwd": "${workspaceFolder}" | ||
146 | }, | ||
147 | { | ||
148 | "type": "lldb", | ||
149 | "request": "launch", | ||
150 | "name": "Debug unit tests in test 'test'", | ||
151 | "cargo": { | ||
152 | "args": ["test", "--no-run", "--test=test", "--package=ra_syntax"], | ||
153 | "filter": { | ||
154 | "kind": "bin" | ||
155 | } | ||
156 | }, | ||
157 | "args": [], | ||
158 | "cwd": "${workspaceFolder}" | ||
159 | }, | ||
160 | { | ||
161 | "type": "lldb", | ||
162 | "request": "launch", | ||
163 | "name": "Debug unit tests in library 'test_utils'", | ||
164 | "cargo": { | ||
165 | "args": ["test", "--no-run", "--lib", "--package=test_utils"], | ||
166 | "filter": { | ||
167 | "kind": "lib" | ||
168 | } | ||
169 | }, | ||
170 | "args": [], | ||
171 | "cwd": "${workspaceFolder}" | ||
172 | }, | ||
173 | { | ||
174 | "type": "lldb", | ||
175 | "request": "launch", | ||
176 | "name": "Debug executable 'ra_cli'", | ||
177 | "cargo": { | ||
178 | "args": ["build", "--bin=ra_cli", "--package=ra_cli"], | ||
179 | "filter": { | ||
180 | "kind": "bin" | ||
181 | } | ||
182 | }, | ||
183 | "args": [], | ||
184 | "cwd": "${workspaceFolder}" | ||
185 | }, | ||
186 | { | ||
187 | "type": "lldb", | ||
188 | "request": "launch", | ||
189 | "name": "Debug unit tests in executable 'ra_cli'", | ||
190 | "cargo": { | ||
191 | "args": ["test", "--no-run", "--bin=ra_cli", "--package=ra_cli"], | ||
192 | "filter": { | ||
193 | "kind": "bin" | ||
194 | } | ||
195 | }, | ||
196 | "args": [], | ||
197 | "cwd": "${workspaceFolder}" | ||
198 | }, | ||
199 | { | ||
200 | "type": "lldb", | ||
201 | "request": "launch", | ||
202 | "name": "Debug unit tests in library 'tools'", | ||
203 | "cargo": { | ||
204 | "args": ["test", "--no-run", "--lib", "--package=tools"], | ||
205 | "filter": { | ||
206 | "kind": "lib" | ||
207 | } | ||
208 | }, | ||
209 | "args": [], | ||
210 | "cwd": "${workspaceFolder}" | ||
211 | }, | ||
212 | { | ||
213 | "type": "lldb", | ||
214 | "request": "launch", | ||
215 | "name": "Debug executable 'tools'", | ||
216 | "cargo": { | ||
217 | "args": ["build", "--bin=tools", "--package=tools"], | ||
218 | "filter": { | ||
219 | "kind": "bin" | ||
220 | } | ||
221 | }, | ||
222 | "args": [], | ||
223 | "cwd": "${workspaceFolder}" | ||
224 | }, | ||
225 | { | ||
226 | "type": "lldb", | ||
227 | "request": "launch", | ||
228 | "name": "Debug unit tests in executable 'tools'", | ||
229 | "cargo": { | ||
230 | "args": ["test", "--no-run", "--bin=tools", "--package=tools"], | ||
231 | "filter": { | ||
232 | "kind": "bin" | ||
233 | } | ||
234 | }, | ||
235 | "args": [], | ||
236 | "cwd": "${workspaceFolder}" | ||
237 | }, | ||
238 | { | ||
239 | "type": "lldb", | ||
240 | "request": "launch", | ||
241 | "name": "Debug test 'cli'", | ||
242 | "cargo": { | ||
243 | "args": ["build", "--test=cli", "--package=tools"], | ||
244 | "filter": { | ||
245 | "kind": "bin" | ||
246 | } | ||
247 | }, | ||
248 | "args": [], | ||
249 | "cwd": "${workspaceFolder}" | ||
250 | }, | ||
251 | { | ||
252 | "type": "lldb", | ||
253 | "request": "launch", | ||
254 | "name": "Debug unit tests in test 'cli'", | ||
255 | "cargo": { | ||
256 | "args": ["test", "--no-run", "--test=cli", "--package=tools"], | ||
257 | "filter": { | ||
258 | "kind": "bin" | ||
259 | } | ||
260 | }, | ||
261 | "args": [], | ||
262 | "cwd": "${workspaceFolder}" | ||
263 | }, | ||
264 | { | ||
265 | "type": "lldb", | ||
266 | "request": "launch", | ||
267 | "name": "Debug unit tests in library 'ra_lsp_server'", | ||
268 | "cargo": { | ||
269 | "args": ["test", "--no-run", "--lib", "--package=ra_lsp_server"], | ||
270 | "filter": { | ||
271 | "kind": "lib" | ||
272 | } | ||
273 | }, | ||
274 | "args": [], | ||
275 | "cwd": "${workspaceFolder}" | ||
276 | }, | ||
277 | { | ||
278 | "type": "lldb", | ||
279 | "request": "launch", | ||
280 | "name": "Debug executable 'ra_lsp_server'", | ||
281 | "cargo": { | ||
282 | "args": ["build", "--bin=ra_lsp_server", "--package=ra_lsp_server"], | ||
283 | "filter": { | ||
284 | "kind": "bin" | ||
285 | } | ||
286 | }, | ||
287 | "args": [], | ||
288 | "cwd": "${workspaceFolder}" | ||
289 | }, | ||
290 | { | ||
291 | "type": "lldb", | ||
292 | "request": "launch", | ||
293 | "name": "Debug unit tests in executable 'ra_lsp_server'", | ||
294 | "cargo": { | ||
295 | "args": [ | ||
296 | "test", | ||
297 | "--no-run", | ||
298 | "--bin=ra_lsp_server", | ||
299 | "--package=ra_lsp_server" | ||
300 | ], | ||
301 | "filter": { | ||
302 | "kind": "bin" | ||
303 | } | ||
304 | }, | ||
305 | "args": [], | ||
306 | "cwd": "${workspaceFolder}" | ||
307 | }, | ||
308 | { | ||
309 | "type": "lldb", | ||
310 | "request": "launch", | ||
311 | "name": "Debug test 'heavy_tests'", | ||
312 | "cargo": { | ||
313 | "args": ["build", "--test=heavy_tests", "--package=ra_lsp_server"], | ||
314 | "filter": { | ||
315 | "kind": "bin" | ||
316 | } | ||
317 | }, | ||
318 | "args": [], | ||
319 | "cwd": "${workspaceFolder}" | ||
320 | }, | ||
321 | { | ||
322 | "type": "lldb", | ||
323 | "request": "launch", | ||
324 | "name": "Debug unit tests in test 'heavy_tests'", | ||
325 | "cargo": { | ||
326 | "args": [ | ||
327 | "test", | ||
328 | "--no-run", | ||
329 | "--test=heavy_tests", | ||
330 | "--package=ra_lsp_server" | ||
331 | ], | ||
332 | "filter": { | ||
333 | "kind": "bin" | ||
334 | } | ||
335 | }, | ||
336 | "args": [], | ||
337 | "cwd": "${workspaceFolder}" | ||
338 | } | ||
339 | ] | ||
340 | } | ||
diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 000000000..045cee326 --- /dev/null +++ b/.vscode/tasks.json | |||
@@ -0,0 +1,47 @@ | |||
1 | // See https://go.microsoft.com/fwlink/?LinkId=733558 | ||
2 | // for the documentation about the tasks.json format | ||
3 | { | ||
4 | "version": "2.0.0", | ||
5 | "tasks": [ | ||
6 | { | ||
7 | "type": "npm", | ||
8 | "script": "compile", | ||
9 | "label": "Build Extension", | ||
10 | "problemMatcher": { | ||
11 | "owner": "typescript", | ||
12 | "pattern": "$tsc", | ||
13 | "fileLocation": ["relative", "${workspaceRoot}/editors/code"] | ||
14 | }, | ||
15 | "path": "editors/code/" | ||
16 | }, | ||
17 | { | ||
18 | "label": "Build Lsp", | ||
19 | "type": "shell", | ||
20 | "command": "cargo build", | ||
21 | "problemMatcher": { | ||
22 | "owner": "rust", | ||
23 | "fileLocation": ["relative", "${workspaceRoot}"], | ||
24 | "pattern": [ | ||
25 | { | ||
26 | "regexp": "^(warning|warn|error)(?:\\[(.*?)\\])?: (.*)$", | ||
27 | "severity": 1, | ||
28 | "code": 2, | ||
29 | "message": 3 | ||
30 | }, | ||
31 | { | ||
32 | "regexp": "^[\\s->=]*(.*?):(\\d*):(\\d*)\\s*$", | ||
33 | "file": 1, | ||
34 | "line": 2, | ||
35 | "column": 3 | ||
36 | } | ||
37 | ] | ||
38 | } | ||
39 | }, | ||
40 | { | ||
41 | "label": "Build All", | ||
42 | "group": "build", | ||
43 | "dependsOn": ["Build Extension", "Build Lsp"], | ||
44 | "problemMatcher": [] | ||
45 | } | ||
46 | ] | ||
47 | } | ||