Commit Graph

534 Commits

Author SHA1 Message Date
vsrs
06b7175650 fixed lint warning 2020-04-30 18:57:40 +03:00
vsrs
11e9e4b1fb Removed unnecessary extraArgs for cargo invocation 2020-04-30 18:53:34 +03:00
vsrs
10836543d6 Fixed tsfmt and eslint errors. 2020-04-30 18:41:48 +03:00
vsrs
eb6f9c23e1 pass Cargo errors to the Debug output channel 2020-04-30 15:25:04 +03:00
vsrs
73a1947d19 MS C++ tools on linux 2020-04-29 16:52:53 +03:00
vsrs
9153e96e88 better configuration enum items 2020-04-29 14:13:57 +03:00
vsrs
042917e6e3 Configuration settings and source maps support 2020-04-29 13:10:42 +03:00
vsrs
48d6e828f1 ms-vscode.cpptools debugger support, initial version. 2020-04-28 17:30:49 +03:00
bors[bot]
45832b990c
Merge #4145
4145: Remove dead code r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-04-25 19:30:04 +00:00
Aleksey Kladov
0ac5ed5a84 Remove dead code 2020-04-25 21:22:40 +02:00
veetaha
5f88df82a6 Remove unnecessary async from vscode language client creation 2020-04-25 20:52:50 +03:00
bors[bot]
51a0058d4c
Merge #3998 #4006
3998: Make add_function generate functions in other modules via qualified path r=matklad a=TimoFreiberg

Additional feature for #3639 

- [x] Add tests for paths with more segments
- [x] Make generating the function in another file work
- [x] Add `pub` or `pub(crate)` to the generated function if it's generated in a different module
- [x] Make the assist jump to the edited file
- [x] Enable file support in the `check_assist` helper

4006: Syntax highlighting for format strings r=matklad a=ltentrup

I have an implementation for syntax highlighting for format string modifiers `{}`.
The first commit refactors the changes in #3826 into a separate struct.
The second commit implements the highlighting: first we check in a macro call whether the macro is a format macro from `std`. In this case, we remember the format string node. If we encounter this node during syntax highlighting, we check for the format modifiers `{}` using regular expressions.

There are a few places which I am not quite sure:
- Is the way I extract the macro names correct?
- Is the `HighlightTag::Attribute` suitable for highlighting the `{}`?

Let me know what you think, any feedback is welcome!

Co-authored-by: Timo Freiberg <timo.freiberg@gmail.com>
Co-authored-by: Leander Tentrup <leander.tentrup@gmail.com>
Co-authored-by: Leander Tentrup <ltentrup@users.noreply.github.com>
2020-04-24 20:10:54 +00:00
Jonathan Dickinson
1d8c25b75c tasks.json Support
Move the task provider anonymous class into a real class, as this seems
to be how Microsoft do this in their documentation.

resolveTask is now implemented, which is used by VSCode to determine how
to execute tasks that the user has defined in tasks.json.
2020-04-22 17:05:04 -07:00
veetaha
c12d0e0214 Refactor the workaround a bit 2020-04-22 12:35:03 +03:00
veetaha
07bd4bedcb Work around crlf in syntax tree 2020-04-22 12:33:11 +03:00
Timo Freiberg
74780a15f6 Jump to sourceChanges in other files 2020-04-21 23:04:44 +02:00
Edwin Cheng
a4b0ce07f8 Add config for proc_macro 2020-04-16 19:28:06 +08:00
veetaha
7534266156 fix: inlay hints config desyncronization between the frontend and the backend
See the explanation in the issue comment:
https://github.com/rust-analyzer/rust-analyzer/issues/3924#issuecomment-612444566
2020-04-11 20:01:54 +03:00
bors[bot]
372414d27b
Merge #3942
3942: vscode: fix typing bug in config r=matklad a=Veetaha

I noticed that the type of nullable properties in config is actually non-nullable
![Screenshot from 2020-04-11 15-29-45](https://user-images.githubusercontent.com/36276403/79043702-6a686d80-7c09-11ea-9ae8-f1a777c7d0f2.png)


Co-authored-by: veetaha <veetaha2@gmail.com>
2020-04-11 13:26:17 +00:00
veetaha
12e23bd60b vscode: fix typing bug in config 2020-04-11 15:40:49 +03:00
veetaha
f778242a37 vscode: fix indent 2020-04-11 15:37:06 +03:00
kjeremy
6f0f86d2c5 Enable the SemanticTokensFeature by default
This is covered under vscode's "editor.semanticHighlighting.enabled"
setting plus the user has to have a theme that has opted into highlighting.

Bumps required vscode stable to 1.44
2020-04-08 15:45:39 -04:00
veetaha
90959b29e0 vscode: log server binary path 2020-04-04 16:10:06 +03:00
Aleksey Kladov
7a4ebd2c8d Remove vscode_lldb setting 2020-04-02 12:56:14 +02:00
Aleksey Kladov
48c58309cc Lean onto default implementation of configs 2020-04-02 12:47:58 +02:00
veetaha
036a8aee2a vscode: postrefactor 2020-04-02 11:13:38 +03:00
veetaha
e763b279a8 vscode: postrefactor variable names 2020-04-02 11:13:38 +03:00
veetaha
d453281bb2 vscode: add goto definition from rust file to syntax tree editor 2020-04-02 11:13:16 +03:00
bors[bot]
98f7842e40
Merge #3820
3820: Remove old syntax highlighting r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-04-02 07:55:11 +00:00
Aleksey Kladov
309fc70155 Remove old syntax highlighting 2020-04-02 09:52:27 +02:00
bors[bot]
f0ba01cd43
Merge #3817
3817: vscode: highlight syntax tree ro editor r=matklad a=Veetaha

Small textmate grammar declaration to make rust-analyzer syntax tree more easily inspectable:
Btw, if we change the file extension of our `ra_syntax/test_data/**` files to `.rast` they should be highlighted in vscode too.

The colors of the tokens are actually going to be color-theme dependent, or you can customize them via:
```jsonc
{
    "editor.tokenColorCustomizations": {
        "textMateRules": [ { "scope": "name", "settings": { /* */ } } ] 
    }
}
```
![image](https://user-images.githubusercontent.com/36276403/78204947-99f9d600-74a3-11ea-8315-cb1c87810c7c.png)

Related: #3682

Co-authored-by: veetaha <veetaha2@gmail.com>
2020-04-02 07:32:14 +00:00
veetaha
62ed01a107 vscode: add highlighting of syntax tree 2020-04-02 05:38:52 +03:00
veetaha
f4f79383b1 vscode: add support for light themes and color customization for syntax tree highlights 2020-04-02 01:20:08 +03:00
bors[bot]
f77fc158fc
Merge #3780 #3787
3780: Simplify r=matklad a=Veetaha

I absolutely love tha fact that removing `.clone()` simplifies the code comparing to other languages where it's actually the contrary (ahem ~~`std::move()`~~)

3787: vscode: add syntax tree inspection hovers and highlights r=matklad a=Veetaha

![inspect-tree](https://user-images.githubusercontent.com/36276403/78029767-c7426900-7369-11ea-9ed6-b8a0f8e05bac.gif)
I implemented the reverse mapping (when you hover in the rust editor), but it seems overcomplicated, so I removed it

Related #3682 

Co-authored-by: veetaha <veetaha2@gmail.com>
Co-authored-by: Veetaha <veetaha2@gmail.com>
2020-03-31 17:40:03 +00:00
veetaha
90cc8cc528 vscode: small refactor 2020-03-31 20:29:07 +03:00
veetaha
f3612b7024 vscode: scroll to the syntax node in rust editor when highlighting 2020-03-31 20:28:10 +03:00
Veetaha
3b09768ebc
vscode: apply review nits 2020-03-31 19:06:07 +03:00
veetaha
4fbca1c64d vscode: use ctx.subscriptions instead of local .disposables 2020-03-31 16:57:03 +03:00
veetaha
09a760e52e vscode: add syntax tree inspection hovers and highlights 2020-03-31 16:20:59 +03:00
Tim
3eb45b9922 Pass string instread of WorkspaceFolder 2020-03-31 10:24:01 +01:00
Tim
9ef1e9efc6 Remove unnecessary null check 2020-03-31 09:11:22 +01:00
Tim
a781a58fe2 Throw error if no folder is opened 2020-03-31 09:06:52 +01:00
Tim
6e535915bd Use namespace import 2020-03-31 09:06:46 +01:00
Tim
768aa4259f Add basic task support
This adds basic support for running `cargo build`, `cargo run`, etc.
2020-03-30 21:23:21 +01:00
Kirill Bulatov
b892a48740 Code review fixes
Co-Authored-By: Veetaha <veetaha2@gmail.com>
2020-03-30 13:39:14 +03:00
Kirill Bulatov
8a23bec2cd Style fixes 2020-03-30 13:39:14 +03:00
Kirill Bulatov
a9dd442733 Send the config from the client 2020-03-30 13:39:14 +03:00
Kirill Bulatov
019f269a0a Process configuration response draft 2020-03-30 13:39:14 +03:00
Kirill Bulatov
8c4aab0c80 Client side draft 2020-03-30 13:39:14 +03:00
Veetaha
51156cbf03
vscode: fix release tag retrieval
Co-Authored-By: Laurențiu Nicola <lnicola@users.noreply.github.com>
2020-03-27 11:05:37 +02:00