Veetaha
9dae94a78d
vscode: contribute "alwaysDownloadServer" option to config
2020-03-07 23:59:33 +02:00
Veetaha
65cecff316
vscode: post refactor HintsUpdater (simplify create() -> constructor call)
2020-03-07 14:39:42 +02:00
Veetaha
61a4ea2532
vscode: more privacy for HintsUpdater
2020-03-07 14:37:15 +02:00
Veetaha
2734ffa20c
vscode: remove logging from inlays, run fix lint issues
2020-03-07 14:34:09 +02:00
Veetaha
ef52fd543f
vscode: remove logic for caching editors as per @matklad
2020-03-07 14:08:35 +02:00
Veetaha
a63446f254
vscode: prerefactor util.ts and ctx.ts
2020-03-07 14:08:35 +02:00
Veetaha
3d93e2108e
vscode: refresh all editors on text changes, simplify inlays api
2020-03-07 14:08:35 +02:00
Veetaha
057cd959da
vscode: add dat semicolon
2020-03-07 14:08:35 +02:00
Veetaha
fd709c0c04
vscode: simpify
2020-03-07 14:08:35 +02:00
Veetaha
6441988d84
vscode: redesign inlay hints to be capable of handling multiple editors
2020-03-07 14:08:35 +02:00
Veetaha
0e6d066a29
vscode: extract Type and Param hint cases of InlayHint at type level (needed further)
2020-03-07 14:08:35 +02:00
Aleksey Kladov
dd4b001505
⬆️ npm deps
2020-03-06 23:22:58 +01:00
Aleksey Kladov
80909f7698
Don't creat public APIs with typos
2020-03-06 18:38:56 +01:00
Aleksey Kladov
95a2755aa8
Concise mode for parameter hints
...
This works around VS Code bug where it tries to cram everything in a
tiny popup, and brings experience closer to Intellij.
2020-03-06 18:35:30 +01:00
Aleksey Kladov
4e7f6c2354
Feature flag for arg snippets
2020-03-06 17:51:10 +01:00
Aleksey Kladov
34d6e22fc1
Actually include readme into .vsix
2020-03-03 18:40:27 +01:00
bors[bot]
b55d22e060
Merge #3388
...
3388: Remove inlay hint in diff views r=matklad a=vbfox
If the left side of a diff view that contain the old version of the file apply inlays they are misplaced and produce a weird display:
![image](https://user-images.githubusercontent.com/131878/75628802-b1ac1900-5bdc-11ea-8c26-6722d8e38371.png )
After the change:
![image](https://user-images.githubusercontent.com/131878/75628831-e91ac580-5bdc-11ea-9039-c6b4ffbdb2be.png )
The detection is done by blacklisting the url schemes used by git and subversion scm extensions, whitelisting `file` is also possible but neither is perfect as VSCode now support both pluggable scm extensions and pluggable remote filesystems. But I suspect that the list of scm extensions is more easily manageable.
**Note**: I can rebase on #3378 if needed as it touches the same lines of code
Co-authored-by: Julien Roncaglia <julien@roncaglia.fr>
2020-03-03 13:45:26 +00:00
Jeremy Kolb
f51b655fef
Update code dependencies
2020-03-03 08:05:59 -05:00
Julien Roncaglia
2f54c1d653
Centralize the check for languageId on document
...
Also move visibleRustEditors to Ctx
2020-03-02 22:54:29 +01:00
Aleksey Kladov
dbd1698e02
Don't fail loudly if the old highlighting breaks
2020-03-02 14:46:46 +01:00
Aleksey Kladov
57d0f238cc
Minimal viable meta
2020-03-02 14:27:26 +01:00
Julien Roncaglia
b95756d21b
Remove inlay in diff views
...
If the left side of a diff view that contain the old
version of the file apply inlays they are misplaced.
The detection is done by blacklisting the url schemes used
by git and subversion scm extensions.
2020-03-01 16:54:56 +01:00
Veetaha
6dc598fa63
vscode: simplify assert.eq() to assert() as per matklad
2020-02-29 00:59:42 +02:00
Veetaha
e7bf99e6fd
vscode: add dat semicolon
2020-02-29 00:33:34 +02:00
Veetaha
3ad0574d7e
vscode: add equality assertion
2020-02-29 00:26:22 +02:00
Veetaha
9cf2577054
vscode: rename nodeAssert -> nativeAssert
2020-02-29 00:07:29 +02:00
Veetaha
b88887e70e
vscode: add error loging on failed assertion
2020-02-29 00:02:19 +02:00
Veetaha
1b9ab04d4b
vscode: migrate to more type-safe assert impl
2020-02-28 23:56:17 +02:00
Aleksey Kladov
da40149572
Fix union classification
2020-02-28 15:03:09 +01:00
bors[bot]
2995fd2c87
Merge #3363
...
3363: Cleanup highlighting tags r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-02-28 13:48:42 +00:00
Jason Williams
8e88db90bc
removing ctrl+r key binding fixes #2733
2020-02-28 12:50:11 +00:00
Aleksey Kladov
701cf43606
Cleanup highlighting tags
2020-02-28 12:13:37 +01:00
bors[bot]
3e25b17cfd
Merge #3361
...
3361: Reset fontStyle for inlay hints r=matklad a=matklad
Otherwise, we get bold hints on `true` and `false`
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-02-28 10:32:18 +00:00
Aleksey Kladov
84b009cbf7
Reset fontStyle for inlay hints
...
Otherwise, we get bold hints on `true` and `false`
2020-02-28 11:31:53 +01:00
Aleksey Kladov
996e18846d
add more tags
2020-02-28 10:39:31 +01:00
Veetaha
9251cd8440
vscode: added feature flags for better short-term ux
2020-02-27 22:04:57 +02:00
Aleksey Kladov
873156640d
Map builtin
2020-02-27 18:37:25 +01:00
Aleksey Kladov
00fc17272d
Set attr scope
2020-02-27 18:31:54 +01:00
Aleksey Kladov
4e5c1f5608
Map unsafe keyword
2020-02-27 17:28:59 +01:00
Aleksey Kladov
b8d7c4e1ad
Fix style
2020-02-27 11:10:58 +01:00
Aleksey Kladov
cfa5afa02d
Fix lint
2020-02-27 10:46:43 +01:00
Aleksey Kladov
356395139c
Actually gate CI on eslint
2020-02-27 10:40:53 +01:00
bors[bot]
ebeca1990e
Merge #3339
...
3339: Fix flickering with new syntax highlighting r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-02-27 09:25:34 +00:00
Aleksey Kladov
b49508ffe3
Fix flickering with new syntax highlighting
2020-02-27 10:19:56 +01:00
bors[bot]
04b3bd5ee8
Merge #3308
...
3308: vscode: fix vscode-vim keybindings conflict r=matklad a=Veetaha
Closes #3013 I hope
vscode-vim extension overrides the `type` command so that it prevents
some keypresses to reach the text document editor.
It conflicts with our `onEnter` keybinding
that is used to support automatic doc comments extending and
indentation insertion.
The VSCode-native way to implement this would be
to use regular expressions, but as per matklad it is
considered not acceptable for the language server.
Thus we implement it via a `Enter` keybinding that
invokes our `onEnter` command which does it via the language-server.
At the end of the day we may only apply
ad hoc workarounds for conflicting extensions.
But vscode has another bug for that. You
either cannot use parantheses in `when` condition
of a keybinding or it just malfunctions.
See an issue about that here: https://github.com/microsoft/vscode/issues/91473
To get the ultimate context, follow this [zulip thread](https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Fwg-rls-2.2E0/topic/Enhanced.20typing )
Co-authored-by: Veetaha <gerzoh1@gmail.com>
2020-02-27 09:00:31 +00:00
Aleksey Kladov
a8e68ff814
Color constants
2020-02-27 09:32:00 +01:00
Aleksey Kladov
f7db49bfc6
Better highlightign API
2020-02-27 09:32:00 +01:00
Aleksey Kladov
723e83fb25
wip
2020-02-26 22:08:21 +01:00
Aleksey Kladov
225ef6dea2
Config to switch to semantic tokens
2020-02-26 16:03:30 +01:00
Aleksey Kladov
8c0d0894b6
Merge pull request #3321 from kjeremy/semantic-client
...
Enable SemanticTokens on the client
2020-02-26 15:59:30 +01:00
Jeremy Kolb
74125d012e
Enable SemanticTokens on the client
...
This will crash the extension on stable and insiders without the "--enable-proposed-api matklad.rust-analyzer" command line switch.
2020-02-26 08:42:26 -05:00
Aleksey Kladov
1f1bda2c5a
Remove unnecessary dep
2020-02-26 14:21:23 +01:00
Veetaha
655c8337c0
vscode: fix vscode-vim keybindings conflict
...
vscode-vim extension overrides the `type` command so that it prevents
some keypresses to reach the text document editor.
It conflicts with our `onEnter` keybinding
that is used to support automatic doc comments extending and
indentation insertion.
The VSCode-native way to implement this would be
to use regular expressions, but as per matklad it is
considered not acceptable for the language server.
Thus we implement it via a `Enter` keybinding that
invokes our `onEnter` command which sends
a request to rust-analyzer process and applies
the appropriate source change recieved from it.
At the end of the day we may only apply
ad hoc workarounds for conflicting extensions.
But vscode has another bug for that. You
either cannot use parantheses in `when` condition
of a keybinding or it just malfunctions.
See an issue about that here: https://github.com/microsoft/vscode/issues/91473
To get the ultimate context, follow this zulip thread: https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Fwg-rls-2.2E0/topic/Enhanced.20typing
2020-02-25 23:20:07 +02:00
bors[bot]
c4c15363fb
Merge #3295
...
3295: Refactoring fetchArtifactReleaseInfo() r=matklad a=Veetaha
https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unnecessary-type-assertion.md
I fact this rule doesn't work when you put an unnecessary non-null assertion in an expression (as we had `(awat f())!`, but it is useful in other cases...
Closes #3295 , i guess...
Co-authored-by: Veetaha <gerzoh1@gmail.com>
2020-02-25 10:09:14 +00:00
bors[bot]
5e6f4ca690
Merge #3299
...
3299: vscode: migrate to request type api r=matklad a=Veetaha
More type-safety to the god of type-safety.
Co-authored-by: Veetaha <gerzoh1@gmail.com>
2020-02-25 09:55:56 +00:00
Veetaha
6ec4a7db42
vscode: wrap non-single-line if body with curlies as per matklad
2020-02-25 01:58:43 +02:00
Veetaha
18b97d9d36
vscode: migrate rust-analyzer-api to import * as lc as per matklad and kjeremy
2020-02-25 01:43:52 +02:00
Veetaha
72e81dae71
vscode: run fmt
2020-02-25 01:00:00 +02:00
Veetaha
c9230b88b4
vscode: migrate inlay_hints to rust-analyzer-api.ts
2020-02-25 00:57:49 +02:00
Veetaha
8aea0ec511
vscode: migrate syntax_tree to rust-analyzer-api.ts
2020-02-25 00:57:14 +02:00
Veetaha
9ea63d5a86
vscode: migrate ssr to rust-analyzer-api.ts
2020-02-25 00:56:57 +02:00
Veetaha
8a8a4d08ef
vscode: migrate runnables to rust-analyzer-api.ts
2020-02-25 00:56:38 +02:00
Veetaha
d6a96a90f4
vscode: migrate parent_module to rust-analyzer-api.ts
2020-02-25 00:56:19 +02:00
Veetaha
8c6581dcc3
vscode: migrate on_enter to rust-analyzer-api.ts
2020-02-25 00:55:48 +02:00
Veetaha
56d1ff6532
vscode: migrate matching_brace to rust-analyzer-api.ts
2020-02-25 00:55:13 +02:00
Veetaha
38d7945ec7
vscode: migrate join_lines to rust-analyzer-api.ts
2020-02-25 00:54:50 +02:00
Veetaha
c9a2fa1835
vscode: migrate collectGarbage to rust-analyzer-api.ts
2020-02-25 00:50:57 +02:00
Veetaha
31d9932d18
vscode: migrate expand_macro to rust-analyzer-api.ts
2020-02-25 00:50:36 +02:00
Veetaha
603bc71a57
vscode: migrate analyzer_status to rust-analyzer-api.ts
2020-02-25 00:50:14 +02:00
Veetaha
8c4409b3bb
vscode: migrate highlighting to rust-analyzer-api.ts
2020-02-25 00:49:54 +02:00
Veetaha
21ab133966
vscode: migrate source_cnage.rs to rust-analyzer-api.rs
2020-02-25 00:49:19 +02:00
Veetaha
39efb301ff
vscode: create rust-analyzer-api.ts
2020-02-25 00:48:44 +02:00
Veetaha
6d15f89a4b
vscode: bump TypeScript version
2020-02-24 21:37:53 +02:00
Veetaha
af57251c31
vscode: remove type assertion
2020-02-24 21:23:56 +02:00
Veetaha
b4db089a6b
add error handling to fetchArtifactReleaseInfo(), throw Error when no artifact found
2020-02-24 21:13:10 +02:00
Aleksey Kladov
cc1469fe9e
Cleanp
2020-02-24 15:41:13 +01:00
bors[bot]
e2a8e891c1
Merge #3290
...
3290: Don't block onEnter if request fails r=matklad a=matklad
closes #3286
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-02-24 11:48:15 +00:00
Aleksey Kladov
910adb9dc7
Don't block onEnter if request fails
...
closes #3286
2020-02-24 12:45:34 +01:00
bors[bot]
223a6676fd
Merge #3288
...
3288: Quick fix circular json error when sanity-check fails r=matklad a=Veetaha
Related issue: #3280
Co-authored-by: Veetaha <gerzoh1@gmail.com>
2020-02-24 11:40:06 +00:00
Aleksey Kladov
b12cbd6062
Don't break onEnter if rust-analyzer fails to start
...
closes #3253
2020-02-24 12:32:15 +01:00
Veetaha
ef4dfab3cc
Quick fix circular json error when sanity-check fails
...
Related issue: #3280
2020-02-24 11:56:52 +02:00
Veetaha
4cee7cddc8
vscode: gracefully handle cancellation errors
2020-02-23 15:49:09 +02:00
Aleksey Kladov
49844ab717
Extract client-side logging
2020-02-22 16:03:47 +01:00
Veetaha
d905abfb11
vscode: migrate to tripple equals
2020-02-22 13:46:11 +02:00
Edwin Cheng
319a09847b
Use stdout directly
2020-02-21 18:33:45 +08:00
Edwin Cheng
489be40d3a
Use ensureServerBinary instead
2020-02-21 18:33:45 +08:00
Edwin Cheng
e7a0d8f8d0
Add trailing newline
2020-02-21 18:33:45 +08:00
Edwin Cheng
4e48a73f9c
Improve server version info
2020-02-21 18:33:45 +08:00
Aleksey Kladov
28bf731751
enforce camel case
2020-02-21 11:22:45 +01:00
eaglgenes101
358b9d685f
Improved compatibility with themes
2020-02-20 12:40:12 -05:00
Aleksey Kladov
742459c8fe
Merge pull request #3204 from Veetaha/feature/vscode-remove-updates-notification-comment
...
vscode: remove comment about updates notification
2020-02-18 13:44:56 +01:00
Aleksey Kladov
c855e36696
Rename config value for server Path
2020-02-18 12:35:44 +01:00
Aleksey Kladov
c0fa5e2246
Rename the binary to rust-analyzer
2020-02-18 12:33:16 +01:00
Aleksey Kladov
784919aec1
Merge pull request #3209 from matklad/eslint
...
Eslint
2020-02-18 01:12:29 +01:00
Aleksey Kladov
f2e44cfe85
Allow floating promises
...
This backfires for message-showing functions
2020-02-18 01:05:52 +01:00
kjeremy
3b57d8eb20
vscode-languageclient 6.1.1
2020-02-17 18:57:19 -05:00
Aleksey Kladov
07a77ffb35
Migrate to eslint
2020-02-17 23:42:25 +01:00
Veetaha
765852a444
vscode: remove comment about updates notification
2020-02-17 22:19:00 +02:00
Veetaha
7379964048
vscode: press ; to respect semicolons
2020-02-17 22:09:44 +02:00
Aleksey Kladov
94fb9ad6b3
Fix extension name
2020-02-17 15:35:06 +01:00