Commit Graph

968 Commits

Author SHA1 Message Date
Lukas Wirth
d8ddde27f9 Make cancelFlycheck request a notification 2022-12-17 23:29:31 +01:00
Lukas Wirth
a04feb915a Add command for manually running flychecks 2022-12-16 22:47:19 +01:00
Maria José Solano
8661740626 Use typed notification method 2022-11-27 09:46:37 -08:00
Lukas Wirth
073a63b93e feat: Allow viewing the full compiler diagnostic in a readonly textview 2022-11-18 19:56:08 +01:00
Lukas Wirth
fccf8eb1fd Properly handle vscode workspace changes 2022-10-29 01:41:02 +02:00
Lukas Wirth
2071d00fd2 Always set up VSCode commands 2022-10-29 00:44:37 +02:00
Lukas Wirth
274df54885 feat: Clicking the status bar item stops and starts the server 2022-10-28 23:10:10 +02:00
bors
8ee23f4f0a Auto merge of #13453 - Veykril:disabled-commands, r=Veykril
internal: Properly handle commands in the VSCode client when the server is stopped
2022-10-21 14:05:25 +00:00
Lukas Wirth
1cb46079e4 internal: Properly handle commands in the VSCode client when the server is stopped 2022-10-21 16:00:43 +02:00
bors
69f01fdff5 Auto merge of #13451 - Veykril:lang-config, r=Veykril
internal: Properly handle language configuration config changes
2022-10-20 19:15:30 +00:00
Lukas Wirth
a8e0a20ce4 internal: Properly handle language configuration config changes 2022-10-20 21:14:36 +02:00
Yotam Ofek
e05df93b8e Workaround the python vscode extension's polyfill 2022-10-20 17:56:51 +00:00
Lukas Wirth
69b845674c Don't catch the server activation error 2022-10-20 11:32:02 +02:00
Lukas Wirth
d63c44e650 Cleanup output channels 2022-10-17 16:01:39 +02:00
Lukas Wirth
0421756b42 Implement stop and start server commands 2022-10-17 15:45:57 +02:00
Lukas Wirth
d68616a140 Make more things private 2022-10-17 15:05:20 +02:00
Lukas Wirth
8aaafddee8 Properly reload changed configs for server start 2022-10-17 14:53:46 +02:00
Lukas Wirth
6f435977df Refactor language client handling 2022-10-17 14:21:12 +02:00
Lukas Wirth
d5f467aa4a Substitute some VSCode variables in the VSCode client 2022-10-16 19:45:08 +02:00
bors
c09151c619 Auto merge of #13402 - HKalbasi:patch-1, r=Veykril
Cast runnableEnv items to string

fix #13390

An alternative approach could be raising an error if there is non string values.
2022-10-16 09:20:38 +00:00
Jonas Schievink
55fdcbe339
Revert "fix: in VSCode, correctly resolve relative paths to errors" 2022-10-14 09:28:44 +02:00
HKalbasi
58e5452a9b
fix formatting 2022-10-12 14:14:59 -07:00
HKalbasi
983ae1b1c9
Cast runnableEnv items to string 2022-10-12 20:40:49 +03:30
Aleksey Kladov
5bbfea03cc fix: in VSCode, correctly resolve relative paths to errors
VS Code problem matcher are restricted to be static "regexes". You can't
create a problem matcher dynamically, and you can't use custom code in
lieu of problem matcher.

This creates a problem for rust/cargo compiler errors. They use paths
relative to the root of the Cargo workspace, but VS Code doesn't
necessary know where that root is.

Luckily, there's a way out: our current problem matcher is defined like
this:

    "fileLocation": [ "autoDetect", "${workspaceRoot}" ],

That means that relative pahts would be resoleved relative to workspace
root. VS Code allows to specify a command inside `${}`. So we can plug
custom logic there to fetch Cargo's workspace root!

And that's exactly what this PR is doing!
2022-10-08 23:25:13 +01:00
Lukas Wirth
9c97997af9 Remove the toggleInlayHints command from VSCode
Inlay hints are no longer something specifc to r-a as it has been
upstreamed into the LSP, we don't have a reason to give the config
for this feature special treatment in regards to toggling. There are
plenty of other options out there in the VSCode marketplace to create
toggle commands/hotkeys for configurations in general which I believe
we should nudge people towards instead.
2022-09-10 11:50:55 +02:00
bors
e8e598f641 Auto merge of #13133 - Veykril:diag-hack, r=Veykril
Move empty diagnostics workaround back into the server

This only touches on the diagnostics in one place instead of multiple as was previously done, since all published diagnostics will go through this code path anyways.

Closes https://github.com/rust-lang/rust-analyzer/issues/13130
2022-08-28 09:56:06 +00:00
Lukas Wirth
9ad0a8c467 Move empty diagnostics workaround back into the server 2022-08-28 11:54:46 +02:00
bors
6bea872edd Auto merge of #13095 - jonas-schievink:avoid-liveshare-error, r=jonas-schievink
fix: Avoid error popup when using in Live Share

cc https://github.com/rust-lang/rust-analyzer/issues/8844

Not sure if there's a better way to do this, feedback appreciated!
2022-08-26 18:39:53 +00:00
bors
55bf51df41 Auto merge of #13087 - Veykril:config-update, r=Veykril
Remove auto-config patching from the VSCode client

This was introduced 4 months ago when we drastically changed the config keys. I'd like to remove this given I always felt uneasy doing edits to a users config from within r-a, and by now most if not all users should've swapped to a new enough version of r-a that should've updated their configs.

The extension will continue to work fine even with the outdated keys afterwards since we still do patching server side as well, and that one we'll have to support for quite some more time (if not until a proper 1.0 release where I assume we can allow ourselves some more user facing breakage)

(There also might've been a small bug in here that prevented users with certain outdated keys to prevent them from enabling certain keys for some reason)
2022-08-26 16:22:57 +00:00
Laurențiu Nicola
10617938b1 Remove unused UpdatesChannel type 2022-08-25 21:33:42 +03:00
Jonas Schievink
dcbbb7f211 ForGoT tO RuN prEttIeR¿ 2022-08-23 15:56:02 +02:00
Jonas Schievink
16a0eb1829 Avoid error popup when using in Live Share 2022-08-23 15:45:02 +02:00
Lukas Wirth
b19f78b022 Remove auto-config patching from the VSCode client 2022-08-22 17:13:49 +02:00
Lukas Wirth
45b7b6a60a Implement lsp extension for cancelling running flychecks 2022-08-19 08:54:53 +02:00
bors
917bd68b37 Auto merge of #13039 - davidbarsky:davidbarsky/remove-used-nightly-checking-code, r=Veykril
chore: remove unused `currentExtensionIsNightly()` in `config.ts`

I was debugging an unrelated issue in rust-analyzer, but came across this unused code and figured that it's fine to send a fully red PR :)
2022-08-18 16:06:18 +00:00
Dezhi Wu
23747419ca fix: a bunch of typos
This PR will fix some typos detected by [typos].

There are also some other typos in the function names, variable names, and file
names, which I leave as they are. I'm more certain that typos in comments
should be fixed.

[typos]: https://github.com/crate-ci/typos
2022-08-17 21:44:58 +08:00
David Barsky
a0b257c9d9 chore: remove unused currentExtensionIsNightly() in config.ts 2022-08-16 13:38:50 -04:00
Jonas Schievink
dcbe892d7c Add an HIR pretty-printer 2022-08-15 13:51:45 +02:00
Lukas Wirth
614969baa7 Pad empty diagnostic messages in relatedInformation as well 2022-08-13 20:49:00 +02:00
Lukas Wirth
ec8256dd80 Move VSCode diagnostics workaroudn into client code 2022-08-13 20:30:30 +02:00
Jake Heinz
4b648d8f6c [code] make toggleInlayHints understand {off,on}UntilPressed 2022-08-08 02:32:49 +00:00
Lukas Wirth
46d6357994 Add a setting to disable comment continuation in VSCode 2022-08-03 18:22:45 +02:00
bors
fbb1337eb3 Auto merge of #12850 - Veykril:display-fix, r=Veykril
fix: Fix error tooltip message for VSCode status bar item
2022-07-22 22:52:53 +00:00
Lukas Wirth
e223d20d97 fix: Fix error tooltip message for VSCode status bar item 2022-07-23 00:52:12 +02:00
Lukas Wirth
f1b5e38563 Revert 03a62c180e 2022-07-23 00:14:34 +02:00
Lukas Wirth
def89af1ef fix: Fix VSCode status bar tooltip not showing the error messages 2022-07-13 13:26:23 +02:00
Laurențiu Nicola
03a62c180e Bump vscode-languageclient 2022-07-09 23:04:14 +03:00
Jonas Schievink
6c6ae965ba Update remaining GitHub URLs 2022-07-08 15:44:49 +02:00
Laurențiu Nicola
ad5a8514a0 Code: use different schemes for the custom views 2022-07-06 18:42:15 +03:00
Chayim Refael Friedman
979d9511a1 Ignore the bin artifact for bench targets
Just like `test`.
2022-06-29 14:16:55 +03:00