bors[bot]
ddccaecb79
Merge #6524
...
6524: Add support for loading rustc private crates r=matklad a=xldenis
This PR presents a solution to the problem of making`rustc_private` crates visible to `rust-analyzer`.
Currently developers add dependencies to those crates behind a `cfg(NOT_A_TARGET)` target to prevent `cargo` from building them.
This solution is unsatisfactory since it requires modifying `Cargo.toml` and causes problems for collaboration or CI.
The proposed solution suggested by @matklad is to allow users to give RA a path where the `rustc` sources could be found and then load that like a normal workspace.
This PR implements this solution by adding a `rustcSource` configuration item and adding the cargo metadata to the crate graph if it is provided.
------
I have no idea how this should be tested, or if this code is generally tested at all. I've locally run the extension with these changes and it correctly loads the relevant crates on a `rustc_private` project of mine.
Co-authored-by: Xavier Denis <xldenis@gmail.com>
2020-11-12 17:55:32 +00:00
Xavier Denis
8716087919
Add support for loading rustc private crates
2020-11-11 12:45:40 +01:00
Aleksey Kladov
0caa491893
Be more pedantic when checking codeAction/resolve support
2020-11-10 20:38:34 +01:00
Aleksey Kladov
7d2eb000b0
Switch to upstream protocol for resolving code action
...
Note that we have to maintain custom implementation on the client
side: I don't see how to marry bulitin resolve support with groups and
snippets.
2020-11-10 18:48:46 +01:00
kjeremy
2d4be2ef2a
Request a refresh of semantic tokens if things are loaded up
2020-10-26 09:23:34 -04:00
bors[bot]
57735f2a32
Merge #6140
...
6140: honour hover.content_format client capability r=lnicola a=robinvd
This removes all markdown when the client does not support the markdown MarkupKind.
Otherwise the output on the editor will have some markdown boilerplate, making it less readable.
For example kak_lsp does not currently support markdown.
![image](https://user-images.githubusercontent.com/22073483/95112949-ef0ff080-0741-11eb-82a7-0594fa2cd736.png )
after:
![image](https://user-images.githubusercontent.com/22073483/95113089-2bdbe780-0742-11eb-94fa-bcfec6d7347a.png )
Co-authored-by: Robin van Dijk <robin@robinjint.nl>
2020-10-06 17:51:20 +00:00
Robin van Dijk
c3cc361294
honor content_format clientcap
...
This removes all markdown when the client does not support the markdown MarkupKind
Otherwise the output on the editor will have some markdown boilerplate, making it less readable
2020-10-05 19:27:29 +02:00
Lukas Wirth
8699331014
Make ImportPrefix a configuration option
2020-10-05 17:41:49 +02:00
Igor Aleksanov
4a1b4b23bb
Replace 'cargo_prefix' option with 'override_cargo'
2020-10-02 12:34:27 +03:00
Igor Aleksanov
2c125f3c63
Add support of runnables arguments in Rust Analyzer
2020-10-02 12:34:27 +03:00
vsrs
b7fda5f936
Make method references CodeLens off by default.
2020-09-29 15:29:20 +03:00
vsrs
eeb40dbece
Add method references CodeLens
2020-09-29 15:29:20 +03:00
flw
e73ee9dfa2
Add hover config linksInHover
to suppress links
2020-09-29 19:47:18 +08:00
Jonas Schievink
d328ee647f
Use log::error!
in a few more places
2020-09-17 17:37:52 +02:00
Lukas Wirth
adc4c6b9d7
Make MergeBehaviour configurable
2020-09-12 12:11:16 +02:00
Andy Russell
24805d1d80
default checkOnSave.enable
to true
in server
2020-09-02 17:44:21 -04:00
Aleksey Kladov
0866b1be89
Align diagnostics config with the rest of rust-analyzer
2020-08-18 16:03:15 +02:00
Igor Aleksanov
34847c8d96
Move analysis config structure to the config.rs
2020-08-18 13:35:36 +03:00
Igor Aleksanov
b56cfcca10
Make disabled diagnostics an argument of corresponding function
2020-08-18 13:32:29 +03:00
Igor Aleksanov
c26c911ec1
Merge branch 'master' into add-disable-diagnostics
2020-08-14 07:34:07 +03:00
Aleksey Kladov
1b0c7701cc
Rename ra_ide -> ide
2020-08-13 17:58:27 +02:00
Pavan Kumar Sunkara
eac24d52e6
Rename ra_project_model -> project_model
2020-08-13 12:05:30 +02:00
Igor Aleksanov
90857ff8b0
Add an AnalysisConfig structure and use it to configure diagnostics run
2020-08-07 14:25:55 +03:00
Clemens Wasser
8d9f8ac273
flycheck: Added checkOnSave.noDefaultFeatures
...
This commit adds the option
`rust-analyzer.checkOnSave.noDefaultFeatures`
and fixes #5550 .
2020-07-30 16:04:01 +02:00
Jonas Schievink
f6f49735e8
Add toggle for experimental diagnostics
2020-07-24 17:39:16 +02:00
bors[bot]
818aeb8a24
Merge #5467
...
5467: Allow null or empty values for configuration r=matklad a=kjeremy
Allow the client to respond to `workspace/configuration` with `null` values. This is allowed per the spec if the client doesn't know about the configuration we've requested.
This also protects against `null` or `{}` during initialize. I'm not sure if we want to interpret `{}` as "don't change anything" but I think that's a reasonable approach to take.
This should help with LSP clients working out of the box.
Fixes #5464
Co-authored-by: kjeremy <kjeremy@gmail.com>
2020-07-21 09:41:54 +00:00
Aleksey Kladov
8f3fdf3315
Typo
2020-07-21 10:50:24 +02:00
Aleksey Kladov
a20b8d751b
Propagate cargo.target to checkOnSave
2020-07-21 10:30:54 +02:00
kjeremy
a32dd9c478
Protect against {}
2020-07-20 18:11:32 -04:00
kjeremy
adc4bb5406
Allow client to respond to workspace/configuration with null values
...
This is allowed per the spec if the client doesn't know about the configuration
we've requested.
2020-07-20 17:42:48 -04:00
Aleksey Kladov
e1e79cf064
Take label offets client capability into account
2020-07-16 18:48:02 +02:00
Aleksey Kladov
d0a8f6a3eb
Automatically reload project info on Cargo.toml changes
2020-07-10 15:35:15 +02:00
Aleksey Kladov
17edf50e2c
Avoid accidently stumping over config values
2020-07-10 10:07:08 +02:00
Aleksey Kladov
7ae696ba76
Remove unwanted dependency
2020-07-08 18:26:31 +02:00
Aleksey Kladov
569504938e
Fix typo
2020-07-05 11:19:16 +02:00
Aleksey Kladov
b8ef8539a6
Fix workspace reloading
2020-07-03 17:19:00 +02:00
Aleksey Kladov
3ef7676076
Implement StatusBar
2020-07-02 15:32:14 +02:00
Aleksey Kladov
a03cfa4926
Automatically reload project on config change
2020-07-01 16:42:14 +02:00
Aleksey Kladov
72fb712dff
Add new module for project loading stuff
2020-06-26 00:27:57 +02:00
Aleksey Kladov
0ec5d4f55c
Rename ra_flycheck -> flycheck
2020-06-25 09:13:46 +02:00
Aleksey Kladov
e6c61d5072
Cleanup project.json deserialization
2020-06-24 16:16:52 +02:00
Aleksey Kladov
a07cad16ab
Rename json_project -> project_json
2020-06-24 16:03:24 +02:00
Aleksey Kladov
154cb8243b
Be more explicit about absolute paths at various places
2020-06-24 14:39:34 +02:00
vsrs
c50157f330
Add Go to Type Definition
hover action.
2020-06-18 10:15:43 +03:00
Gabriel Valfridsson
656e95211e
Warnings as hint or info
2020-06-17 00:00:43 +02:00
Thiébaud Weksteen
44f28f65af
Accept relative paths in rust-project.json
...
If a relative path is found as part of Crate.root_module or Root.path,
interpret it as relative to the location of the rust-project.json file.
2020-06-15 13:11:53 +02:00
Clemens Wasser
fe21fc2d25
checkOnSafe.features and checkOnSafe.allFeatures now work identically.
2020-06-10 09:37:26 +02:00
Clemens Wasser
33b9058838
Most of the checkOnSafe options now default to the cargo equivalent.
2020-06-10 09:27:25 +02:00
Clemens Wasser
47ef544fa5
Added the rust-analyzer.checkOnSave.features option.
2020-06-10 08:51:11 +02:00
Clemens Wasser
684b6fa1b8
flycheck now uses the configured features
2020-06-09 21:47:54 +02:00