Commit graph

697 commits

Author SHA1 Message Date
feileacan
d019cdbbb2
Check cargoExtraArgs for undefined before using 2020-10-18 11:40:48 +11:00
Laurențiu Nicola
010d123f23 Insert a ZWNJ before type hints 2020-10-15 10:56:28 +03:00
Laurențiu Nicola
513d25cf03 Fix resolveCodeAction request 2020-10-13 12:47:01 +03:00
Zac Pullar-Strecker
c648884397 Differentiate method/tymethod by determining 'defaultness'
Currently a method only has defaultness if it is a provided trait
method, but this will change when specialisation is available and may
need to become a concept known to hir.

I opted to go for a 'fewest changes' approach given specialisation is
still under development.
2020-10-08 15:04:21 +13:00
Zac Pullar-Strecker
974518fde7 Code reorganisation and field support 2020-10-08 15:04:20 +13:00
Zac Pullar-Strecker
a14194b428 Changes from review 2020-10-08 15:01:30 +13:00
Zac Pullar-Strecker
bfda0d2583 WIP: Command to open docs under cursor 2020-10-08 14:59:31 +13:00
Igor Aleksanov
5b26629a4d Support 'runnables' options in the vs code extension 2020-10-02 12:35:22 +03:00
Aleksey Kladov
af8063fe37 Extend **Status** command to also show dep info for the file
This should help with troubleshooting wrong project configuration
2020-09-29 22:13:23 +02:00
vsrs
eeb40dbece Add method references CodeLens 2020-09-29 15:29:20 +03:00
Matthias Einwag
8eae893c76 Fix lint 2020-09-23 08:39:04 -07:00
Matthias Einwag
c7f4647749 Move unlink on download into download function
Since this is required by all callsites its easier to have it in the
function itself.
2020-09-23 08:37:02 -07:00
Matthias Einwag
df4d59512e Remane function 2020-09-23 08:27:25 -07:00
Matthias Einwag
d38f759c63 Use closure in trailing position and strongly type header map 2020-09-23 08:24:35 -07:00
Matthias Einwag
87933e15ce
Apply suggestions from code review
Co-authored-by: Veetaha <veetaha2@gmail.com>
2020-09-23 08:14:18 -07:00
Matthias Einwag
45de3e738c Remove stray newline 2020-09-23 01:06:10 -07:00
Matthias Einwag
145bd6f701 Fix clearing the token
The previous version would have interpreted an empty token as
an abort of the dialog and would have not properly cleared the token.
This is now fixed by checking for `undefined` for a an abort and
by setting the token to `undefined` in order to clear it.
2020-09-23 01:03:34 -07:00
Matthias Einwag
501b516db4 Add a command for updating the Github API token 2020-09-23 00:50:34 -07:00
Matthias Einwag
a0a7cd306e Use retry dialog also for downloads
Since the change already implements a retry dialog for
network operations, let's also use it for allowing to retry the
actual file.
2020-09-23 00:28:38 -07:00
Matthias Einwag
1503d9de41 Fix tslint 2020-09-22 23:41:51 -07:00
Matthias Einwag
b93ced6f63 Allow to use a Github Auth token for fetching releases
This change allows to use a authorization token provided by Github in
order to fetch metadata for a RA release. Using an authorization token
prevents to get rate-limited in environments where lots of RA users use
a shared client IP (e.g. behind a company NAT).

The auth token is stored in `ExtensionContext.globalState`.
As far as I could observe through testing with a local WSL2 environment
that state is synced between an extension installed locally and a remote
version.

The change provides no explicit command to query for an auth token.
However in case a download fails it will provide a retry option as well
as an option to enter the auth token. This should be more discoverable
for most users.

Closes #3688
2020-09-22 23:12:51 -07:00
Laurențiu Nicola
c217bc561f Fix LSP requests with no arguments 2020-09-17 13:31:42 +03:00
Laurențiu Nicola
59cb6a9b31 Fix delimiter in SSR example 2020-09-15 14:32:56 +03:00
kjeremy
b527257330 Move to vscode-languageclient 7.0.0-next.9
Stabilizes call hierarchy and semantic tokens features.
2020-09-02 09:40:59 -04:00
bors[bot]
dd685d0d51
Merge #5910 #5912
5910: Fix some typos r=matklad a=SomeoneToIgnore



5912: Remove fixme from inlay_hints.ts r=matklad a=Veetaha

I have reevaluated the fixme and it doesn't seem necessary to pass an array of files
to the inlay hints request.
This will (a) make the request more compilcated (b), make us wait for
inlay hints for `all` active editors resolve at once before rendering and (c)
doesn't seem required because 99% of the time there is a single active editor
in the IDE

Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
Co-authored-by: Veetaha <veetaha2@gmail.com>
2020-08-29 14:52:42 +00:00
Veetaha
de2324d9e6 Remove fixme from inlay_hints.ts
I have reevaluated the fixme and it doesn't seem necessary to pass an array of files
to the inlay hints request.
This will (a) make the request more compilcated (b), make us wait for
inlay hints for `all` active editors resolve at once before rendering and (c)
doesn't seem required because 99% of the time there is a single active editor
in the IDE
2020-08-29 02:05:42 +03:00
Kirill Bulatov
3ac9732ca3 Fix some typos 2020-08-28 21:55:24 +03:00
Veetaha
5b9a882edc Make inlay hints colors more configurable 2020-08-26 02:53:42 +03:00
bors[bot]
d7f4711321
Merge #5841
5841: Gate stream.pipeline workaround on fixed versions of node r=matklad a=Veetaha

Fixes the symptom of https://github.com/cdr/code-server/issues/1810
Original report here: https://github.com/rust-analyzer/rust-analyzer/issues/3167#issuecomment-678390564
Thanks to @hjfreyer for precise investigation :D

Co-authored-by: Veetaha <veetaha2@gmail.com>
2020-08-24 14:33:35 +00:00
Veetaha
74ed42c8e9 Gate stream.pipeline workaround on fixed versions of node 2020-08-21 22:15:04 +03:00
Veetaha
54d4bc2622
Dont ask me why... 2020-08-21 21:14:40 +03:00
bors[bot]
6826dd044a
Merge #5782
5782: Fix StatusNotification r=matklad a=vsrs

This PR fixes the following:

As per specification `params` property in [NotificationMessage ](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#notificationMessage) should be `array | object` while RA uses `"loading" | "ready" | "invalid" | "needsReload"`.

Co-authored-by: vsrs <vit@conrlab.com>
2020-08-17 14:23:03 +00:00
vsrs
1eed036a6e Fix StatusNotification 2020-08-17 14:56:27 +03:00
Aleksey Kladov
8d34262956 Rename ra_toolchain -> toolchain 2020-08-12 16:52:28 +02:00
bors[bot]
cef39c3efb
Merge #5697
5697: Remove workaround for semantic token flickering r=jonas-schievink a=kjeremy

See: https://github.com/microsoft/vscode-languageserver-node/issues/576#issuecomment-593384479

This has been fixed since vscode 1.44

Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
2020-08-10 14:48:19 +00:00
Jeremy Kolb
58c97bdcbf Remove 'as any' 2020-08-09 18:09:27 -04:00
Jeremy Kolb
7252babc13 Remove workaround for semantic token flickering
See: https://github.com/microsoft/vscode-languageserver-node/issues/576#issuecomment-593384479

This has been fixed since vscode 1.44
2020-08-09 17:57:27 -04:00
Veetaha
e43811c164 Fix no inlay hints / unresolved tokens until manual edit
No we return ContentModified during the workspace loading. This signifies the language
client to retry the operation (i.e. the client will
continue polling the server while it returns ContentModified).
I believe that there might be cases of overly big projects where the backoff
logic we have setup in `sendRequestWithRetry` (which we use for inlay hints)
might bail too early (currently the largest retry standby time is 10 seconds).
However, I've tried on one of my project with 500+ dependencies and it is still enough.
2020-08-08 21:53:38 +03:00
bors[bot]
8c802a3dbb
Merge #5513
5513: Try figure out correct workspace in vscode multi root workspace r=vsrs a=urbandove

the code to replace the root with the `${workspaceRoot}` arg breaks in multi root workspaces as it needs a qualifier `${workspaceRoot:workspaceName}`

This PR attempts to figure out the root workspace - and if it cant find it falls back to the first workspace

Co-authored-by: Urban Dove <urbandove80@gmail.com>
2020-07-31 11:13:19 +00:00
David Lattimore
cf55806257 SSR: Restrict to current selection if any
The selection is also used to avoid unnecessary work, but only to the
file level. Further restricting unnecessary work is left for later.
2020-07-29 15:06:58 +10:00
Urban Dove
a85e64770d delete empty line 2020-07-26 13:42:17 -04:00
Urban Dove
b32528659a try select correct workspace in vscode multi workspace 2020-07-25 22:23:13 -04:00
David Lattimore
58680cb08e SSR: Fix a typescript lint warning 2020-07-24 22:23:14 +10:00
David Lattimore
3975952601 SSR: Pass current file position through to SSR code.
In a subsequent commit, it will be used for resolving paths.
2020-07-24 21:34:00 +10:00
bors[bot]
85532e2df3
Merge #5480
5480: Fix snippetTextEdits applying to other files r=matklad a=TimoFreiberg

Fixes #4551
`vscode.window.visibleTextEditors` only contains editors whose contents are being displayed at the moment, so the previous logic only worked if the other file for which a snippetTextEdit is being received was visible in a separate split.

I feel that this is a hacky approach, so feel free to reject it for something nicer :)

Co-authored-by: Timo Freiberg <timo.freiberg@gmail.com>
2020-07-23 12:33:24 +00:00
James Leitch
995c624f57 ProblemMatcher auto detects relative/absolute paths and matches VSCode LSP's owner and source. VSCode LSP updated to specify owner. 2020-07-22 22:34:47 -07:00
Timo Freiberg
1b5a74ef18 Fix snippetTextEdits applying to other files
vscode.window.visibleTextEditors only contains editors whose contents
are being displayed at the moment, so the previous logic only worked if
the other file for which a snippetTextEdit is being received was visible
in a separate split.
2020-07-22 17:36:54 +02:00
Veetaha
e2fec10dc1 Workaround rollup messing up default imports 2020-07-08 14:47:34 +03:00
Veetaha
f92bfb5807 Gzip artifacts
Co-authored-by: bjorn3 <bjorn3@users.noreply.github.com>

Override miniz_oxide to build it with optimizations

Building this crate with optimizations decreases the gzipping
part of `cargo xtask dist` from `30-40s` down to `3s`,
the overhead for `rustc` to apply optimizations is miserable on this background
2020-07-07 23:30:11 +03:00
Jonas Schievink
f44c4b61e1 Add a command to compute memory usage statistics 2020-07-07 12:10:14 +02:00