Commit Graph

832 Commits

Author SHA1 Message Date
Aleksey Kladov
fa019c8f56 Document rust-project.json 2020-06-03 15:17:26 +02:00
bors[bot]
2f6ab77708
Merge #4710
4710: New runnables r=matklad a=matklad

bors d=@vsrs

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-06-02 20:44:56 +00:00
bors[bot]
0035dafbfa
Merge #4711
4711: Disable rust-analyzer.{cargo,checkOnSave}.allFeatures by default r=matklad a=lnicola



Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2020-06-02 16:16:38 +00:00
Laurențiu Nicola
7a66d99897 Disable rust-analyzer.{cargo,checkOnSave}.allFeatures by default 2020-06-02 19:14:34 +03:00
Aleksey Kladov
a83ab820a4 Spec better runnables 2020-06-02 17:34:18 +02:00
Aleksey Kladov
0303982119 New runnables API 2020-06-02 17:22:42 +02:00
Aleksey Kladov
0ced18eee0 Move run commands to commands.ts 2020-06-02 14:52:55 +02:00
bors[bot]
131ccd9540
Merge #4580
4580: Fix invoking cargo without consulting CARGO env var or standard installation paths r=matklad a=Veetaha

Followup for #4329

The pr essentially fixes [this bug](https://youtu.be/EzQ7YIIo1rY?t=2189)

cc @lefticus

Co-authored-by: veetaha <veetaha2@gmail.com>
2020-06-02 11:58:28 +00:00
Alin Sinpalean
771457ec5c Always derive from process.env when spawning a child process/shell execution
This is useful when an extension (e.g. Nix Environment Selector) or launch
configuration sets one or more environment variables.

When `env` is not explicitly specified in the options passed to
`child_process.spawn()` or `vscode.ShellExecution()`, then `process.env` gets
applied automatically. But when an explicit `env` is set, it should inherit from
`process.env` rather than replace it completely.
2020-05-31 13:41:55 +02:00
veetaha
d605ec9c32 Change Runnable.bin -> Runnable.kind
As per matklad, we now pass the responsibility for finding the binary to the frontend.
Also, added caching for finding the binary path to reduce
the amount of filesystem interactions.
2020-05-31 05:21:45 +03:00
veetaha
030d78345f Fix invoking cargo without consulting CARGO or standard installation paths 2020-05-31 03:10:23 +03:00
vsrs
f3e04fbbab Add inRustProject when-clause for commands. 2020-05-27 19:46:23 +03:00
bors[bot]
3c5112b079
Merge #4625 #4629
4625: Partially fix displaying inlay hints in Github PR diff views r=matklad a=Veetaha

See the comment in https://github.com/rust-analyzer/rust-analyzer/issues/4608#issuecomment-63424257

It partially fixes the left side of diff view (the one where old code is displayed), but the diff editor with new code changes still has `file` scheme and will proceed displaying inlay hints...

4629: Fix the `should_panic` snippet r=matklad a=eminence

Closes #4628

Co-authored-by: veetaha <veetaha2@gmail.com>
Co-authored-by: Andrew Chin <achin@eminence32.net>
2020-05-27 12:34:03 +00:00
veetaha
3c749b6224 Partially fix displaying inlay hints in Github PR diff views 2020-05-26 22:55:35 +03:00
Yuki Kodama
1e823d6770 Add question mark operator 2020-05-26 02:36:34 +09:00
bors[bot]
30f058dfea
Merge #4602 #4603
4602: Add boolean literal semantic token type to package.json r=matklad a=lnicola

Closes #4583.

CC @GrayJack

4603: Add self keyword semantic token type r=matklad a=lnicola

Not sure if this is warranted a new token type or just a modifier.

---

CC #4583, @GrayJack

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2020-05-25 14:08:21 +00:00
Aleksey Kladov
0ebb25b29b Document parentModule experimental LSP request 2020-05-25 15:59:49 +02:00
Aleksey Kladov
a30bdd9795 Cleanup lsp extensions on the client side 2020-05-25 14:56:26 +02:00
Aleksey Kladov
76e170c3d0 Less rust-analyzer specific onEnter 2020-05-25 14:28:47 +02:00
Aleksey Kladov
6058b8b0f6 Flatten commands.ts 2020-05-25 12:14:44 +02:00
Aleksey Kladov
021b3da672 Flatten simple commands 2020-05-25 11:10:31 +02:00
Laurențiu Nicola
c2358365ad Add self keyword semantic token type 2020-05-25 12:08:58 +03:00
Aleksey Kladov
4a013ec62d Remove dead code 2020-05-25 10:59:54 +02:00
Laurențiu Nicola
87aa746ed2 Add boolean literals to package.json 2020-05-25 11:39:56 +03:00
veetaha
5dab5e7379 Introduce toggle inlay hints vscode command
Users now can assign a shortcut for this command
via the general vscode
keybindings ui or `keybinding.json file`

Closes: #4599
2020-05-25 03:59:46 +03:00
bors[bot]
fbb8b884a2
Merge #4593
4593: Document some rust-analyzer specific protocol extensions r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-05-24 15:05:20 +00:00
Aleksey Kladov
9342273616 Document matchingBrace LSP request 2020-05-24 16:53:18 +02:00
Matthew Jasper
e2d36cb692 Highlight true and false as literals 2020-05-24 15:12:17 +01:00
Aleksey Kladov
c1a7f74917
Merge pull request #4574 from lnicola/bump-deps
Bump some dependencies
2020-05-24 16:05:41 +02:00
Aleksey Kladov
ce7144a93d
Merge pull request #4474 from georgewfraser/color_attrs
Color attribute functions
2020-05-24 15:32:31 +02:00
Laurențiu Nicola
6c5888d136 Bump more npm deps 2020-05-24 16:32:00 +03:00
Laurențiu Nicola
d18704ddd2 Bump some npm deps 2020-05-24 16:32:00 +03:00
Aleksey Kladov
f4f5fca101
Merge pull request #4538 from vsrs/vscode_tests
vscode client side tests
2020-05-23 16:39:04 +02:00
bors[bot]
4cc2ff6e39
Merge #4555 #4575
4555: VSCode: added patchelf after download for NixOS support r=matklad a=cab404

This adds Nix support, and fixes #4542 

4575: Use Chalk's built-in representations for fn items and pointers r=matklad a=flodiebold

The `TypeName::FnDef` was just added; the function pointer variant has existed for a while, I just forgot about it because it's special (because fn pointers can be higher-ranked over lifetimes).

We *could* also make `FnPtr` a separate `Ty` variant instead of a `TypeCtor` variant, which would make the conversion code a bit less special-casey, but it doesn't seem worth doing right now.

Co-authored-by: Vladimir Serov <me@cab404.ru>
Co-authored-by: Cabia Rangris <me@cab404.ru>
Co-authored-by: Florian Diebold <florian.diebold@freiheit.com>
2020-05-23 11:32:26 +00:00
Aleksey Kladov
2075e77ee5 CodeAction groups 2020-05-22 17:32:46 +02:00
Aleksey Kladov
5ef4ebff20 Use WorkspaceEdit for ssr 2020-05-22 00:28:49 +02:00
Vladimir Serov
b4ef1afd30
Merge branch 'nix-patchelf' of github.com:cab404/rust-analyzer into nix-patchelf 2020-05-21 21:33:30 +03:00
Vladimir Serov
ec5162fa7f
editors/vscode: forgotten await in os check 2020-05-21 21:32:27 +03:00
Vladimir Serov
757292856b
editors/vscode: patchelf-ing without intermediate files 2020-05-21 21:32:11 +03:00
Aleksey Kladov
5b5ebec440 Formalize JoinLines protocol extension 2020-05-21 20:05:33 +02:00
Cabia Rangris
d7331b2d5d
Update editors/code/src/main.ts
Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
2020-05-21 17:50:28 +02:00
Vladimir Serov
8e0d776369
editor/vscode: lint 2020-05-21 18:49:30 +03:00
Vladimir Serov
125e4197d8
editors/vscode: removing original file after patching 2020-05-21 18:45:37 +03:00
Vladimir Serov
3a9aa80502
editors/vscode: added patchelf after download 2020-05-21 18:26:50 +03:00
bors[bot]
3cba0dc26b
Merge #4552
4552: Transition OnEnter to WorkspaceSnippetEdit r=matklad a=matklad

This also changes our handiling of snippet edits on the client side.
`editor.insertSnippet` unfortunately forces indentation, which we
really don't want to have to deal with. So, let's just implement our
manual hacky way of dealing with a simple subset of snippets we
actually use in rust-analyzer



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-05-21 13:10:00 +00:00
Aleksey Kladov
4b495da368 Transition OnEnter to WorkspaceSnippetEdit
This also changes our handiling of snippet edits on the client side.
`editor.insertSnippet` unfortunately forces indentation, which we
really don't want to have to deal with. So, let's just implement our
manual hacky way of dealing with a simple subset of snippets we
actually use in rust-analyzer
2020-05-21 15:08:03 +02:00
Laurențiu Nicola
0f953ddd9e Fix phrasing in inlay hints settings 2020-05-21 12:26:03 +03:00
vsrs
c41a10c293 Apply suggestions from @Veetaha code review 2020-05-21 11:34:34 +03:00
vsrs
8ee40ccbe9 vscode client side tests 2020-05-20 22:31:39 +03:00
vsrs
d264d7b9f2 Debug lens fix for a binary. 2020-05-20 09:42:00 +03:00