aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Support 'runnables' options in the vs code extensionIgor Aleksanov2020-10-025-2/+31
|
* Replace 'cargo_prefix' option with 'override_cargo'Igor Aleksanov2020-10-024-10/+10
|
* Add support of runnables arguments in Rust AnalyzerIgor Aleksanov2020-10-024-0/+30
|
* Merge #6118bors[bot]2020-10-021-0/+10
|\ | | | | | | | | | | | | | | | | 6118: Document Clippy strategy r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * Document Clippy strategyAleksey Kladov2020-10-021-0/+10
| |
* | Merge #6104bors[bot]2020-10-026-7/+7
|\ \ | | | | | | | | | | | | | | | | | | | | | 6104: Minor clippy performance suggestions r=matklad a=kjeremy Co-authored-by: kjeremy <[email protected]>
| * | Minor clippy performance suggestionskjeremy2020-09-306-7/+7
| | |
* | | Merge #6116bors[bot]2020-10-023-19/+19
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | 6116: Up rustc-ap-rustc_lexer to 681 r=matklad a=kjeremy cargo update as well Co-authored-by: kjeremy <[email protected]>
| * | Up rustc-ap-rustc_lexer to 681kjeremy2020-10-013-19/+19
| | | | | | | | | | | | cargo update as well
* | | Merge #6114bors[bot]2020-10-011-5/+4
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | 6114: Improve grammar and fix code example in style guide r=kjeremy a=lnicola Co-authored-by: Laurențiu Nicola <[email protected]>
| * | Improve grammar and fix code example in style guideLaurențiu Nicola2020-10-011-5/+4
|/ /
* | Merge #6101bors[bot]2020-10-011-12/+19
|\ \ | | | | | | | | | | | | | | | | | | | | | 6101: cargo update r=kjeremy a=kjeremy Co-authored-by: kjeremy <[email protected]>
| * | cargo updatekjeremy2020-09-301-12/+19
| |/
* | Merge #6102bors[bot]2020-09-301-21/+52
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6102: Fix MergingBehaviour::Last creating unintuitive import trees r=jonas-schievink a=Veykril The way this behaviour currently works is actually a bit weird. Imagine the following three imports get requested for insertion in the given order: - `winapi::um::d3d11::ID3D11Device` - `winapi::shared::dxgiformat::DXGI_FORMAT` - `winapi::um::d3d11::D3D11_FILTER` After the first two you will have the following tree: ```rust use winapi::{shared::dxgiformat::DXGI_FORMAT, um::d3d11::ID3D11Device}; ``` which is to be expected as they arent nested this kind of merging is allowed, but now importing the third one will result in: ```rust use winapi::{shared::dxgiformat::DXGI_FORMAT, um::d3d11::ID3D11Device, um::d3d11::D3D11_FILTER}; ``` which is still fine according to the rules, but it looks weird(at least in my eyes) due to the long paths that are quite similar. The changes in this PR will change the criteria for when to reject `Last` merging, it still disallows multiple nesting but it also only allows single segment paths inside of the `UseTreeList`. With this change you get the following tree after the first two imports: ```rust use winapi::um::d3d11::ID3D11Device; use winapi::shared::dxgiformat::DXGI_FORMAT; ``` and after the third: ```rust use winapi::shared::dxgiformat::DXGI_FORMAT; use winapi::um::d3d11::{ID3D11Device, D3D11_FILTER}; ``` Which I believe looks more like what you would expect. Co-authored-by: Lukas Wirth <[email protected]>
| * Fix MergingBehaviour::Last not working properlyLukas Wirth2020-09-301-21/+52
|/
* Merge #6096bors[bot]2020-09-298-32/+85
|\ | | | | | | | | | | | | | | | | 6096: Extend **Status** command to also show dep info for the file r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * Extend **Status** command to also show dep info for the fileAleksey Kladov2020-09-298-32/+85
| | | | | | | | This should help with troubleshooting wrong project configuration
* | Merge #6095bors[bot]2020-09-296-64/+13
|\| | | | | | | | | | | | | | | | | 6095: Remove periodic gc stub r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * Remove periodic gc stubAleksey Kladov2020-09-296-64/+13
|/
* Merge #6094bors[bot]2020-09-291-1/+3
|\ | | | | | | | | | | | | | | 6094: More panic_context r=matklad a=matklad bors r+\n🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * More panic_contextAleksey Kladov2020-09-291-1/+3
| |
* | Merge #6093bors[bot]2020-09-293-2/+55
|\| | | | | | | | | | | | | | | 6093: Add panic_context module for better panic messages r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * Add panic_context module for better panic messagesAleksey Kladov2020-09-293-2/+55
|/
* Merge #6090bors[bot]2020-09-291-0/+52
|\ | | | | | | | | | | | | | | 6090: More style advice r=matklad a=matklad bors r+\n🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * More style adviceAleksey Kladov2020-09-291-0/+52
| |
* | Merge #5928bors[bot]2020-09-297-9/+175
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5928: Add method references CodeLens r=vsrs a=vsrs The PR adds CodeLens for methods and free-standing functions: ![method_refs](https://user-images.githubusercontent.com/62505555/91858244-95fbfb00-ec71-11ea-90c7-5b3ee067e305.png) Relates to #5836 Co-authored-by: vsrs <[email protected]>
| * | Replace "No references" with "0 references".vsrs2020-09-291-2/+3
| | |
| * | Add testsvsrs2020-09-291-3/+77
| | |
| * | Do not show references CodeLens for tests.vsrs2020-09-293-14/+26
| | |
| * | Make method references CodeLens lazy.vsrs2020-09-292-43/+56
| | |
| * | Make method references CodeLens off by default.vsrs2020-09-292-3/+3
| | |
| * | Add method references CodeLensvsrs2020-09-294-8/+74
|/ /
* | Merge #6080bors[bot]2020-09-295-13/+149
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6080: Add hover config `linksInHover` to suppress links r=flw-cn a=flw-cn This PR solves the problem of using RA under vim8. It should close #6014. Since vim8's popup-window doesn't capture focus, the URL given by RA is effectively useless. links are neither displayed correctly nor can they be clicked. This makes the hover window ugly and inefficient. I'm providing this patch so that people who share my confusion (which I'm almost certain vim8 users do) will have a way to remove links from markdown. I noticed that [gopls has an option](https://github.com/golang/tools/blob/master/gopls/doc/settings.md#linksinhover-bool) for a similar purpose. So I added an option `linksInHover` to enable this behavior. This is a bool value and defaults to `true` to keep the behavior consistent with the master version. But you can suppress the links in the hover text by setting it to `false`. The name of my option, `linksInHover`, is borrowed from gopls. Before applying this patch: <img width="1280" alt="image" src="https://user-images.githubusercontent.com/5546718/93285021-85698a00-f806-11ea-911d-e77fea4a47f0.png"> After applying this patch(with `"rust-analyzer.hoverActions.linksInHover": false,`): <img width="1280" alt="image" src="https://user-images.githubusercontent.com/5546718/94332256-2e359780-0006-11eb-9724-1aed14130d0d.png"> This is the full test cases: ``` fn main() { let args: Vec<String> = std::env::args().collect(); test(); println!("args: {:?}", args); } /// Test cases: /// case 1. bare URL: https://rust-lang.org/ /// case 2. inline URL with title: [foo](https://rust-lang.org/) /// case 3. code refrence: [`Result`] /// case 4. code refrence but miss footnote: [`String`] /// case 5. autolink: <http://rust-lang.org/> /// case 6. email address: <[email protected]> /// case 7. refrence: [bing][google] /// case 8. collapsed link: [bing][] /// case 9. shortcut link: [bing] /// case 10. inline without URL: [bing]() /// case 11. refrence: [foo][foo] /// case 12. refrence: [foo][bar] /// case 13. collapsed link: [foo][] /// case 14. shortcut link: [foo] /// case 15. inline without URL: [foo]() /// case 16. just escaped text: \[hello] /// case 17. inline link: [Foo](foo::Foo) /// /// [`Result`]: ../../std/result/enum.Result.html /// [^bing]: https://www.bing.com/ /// [^google]: https://www.google.com/ pub fn test() { println!("Hello"); } ``` screenshot: <img width="1278" alt="image" src="https://user-images.githubusercontent.com/5546718/94332055-45738580-0004-11eb-9153-707f508d0c4b.png"> Co-authored-by: flw <[email protected]>
| * | Add hover config `linksInHover` to suppress linksflw2020-09-295-13/+149
|/ /
* | Merge #6019bors[bot]2020-09-296-47/+61
|\ \ | |/ |/| | | | | | | | | | | 6019: Remove make::path_from_text r=matklad a=Veykril This removes the `make::path_from_text` function, which according to a note should've been private. I removed it since it didn't really serve a purpose as it was simply wrapping `make::ast_from_text`. Co-authored-by: Lukas Wirth <[email protected]>
| * Remove make::path_from_textLukas Wirth2020-09-166-47/+61
| |
* | Merge #6088bors[bot]2020-09-282-11/+11
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | 6088: Update chalk to 0.30.0 r=flodiebold a=nathanwhit Fixes #6078 and CI failures. Co-authored-by: Nathan Whitaker <[email protected]>
| * | Update chalk to 0.30.0Nathan Whitaker2020-09-282-11/+11
| | |
* | | Merge #6087bors[bot]2020-09-281-6/+7
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | 6087: Microoptimize r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * | MicrooptimizeAleksey Kladov2020-09-281-6/+7
|/ /
* | Merge #6086bors[bot]2020-09-282-11/+11
|\ \ | | | | | | | | | | | | | | | | | | | | | 6086: chalk 0.29.0 r=kjeremy a=kjeremy Co-authored-by: Jeremy Kolb <[email protected]>
| * | chalk 0.29.0Jeremy Kolb2020-09-282-11/+11
|/ /
* | Merge #6033bors[bot]2020-09-284-29/+201
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6033: Make name resolution resolve proc macros instead of relying purely on the build system r=matklad a=jonas-schievink This makes name resolution look at proc-macro declaration attributes like `#[proc_macro_derive]` and defines the right proc macro in the macro namespace, fixing unresolved custom derives like `thiserror::Error` (which can cause false positives, now that we emit diagnostics for unresolved imports). This works even when proc-macro support is turned off, in which case we fall back to a dummy expander that always returns an error. IMO this is the right way to handle at least the name resolution part of proc. macros, while the *expansion* itself should rely on the build system to build and provide the macro DLL. It does mean that they may go out of sync, but we can provide diagnostics if that happens (something like "could not find macro X in crate Y – ensure that all files of crate Y are saved"). I think it is valuable to be able to reason about proc macros even when we can't expand them, since proc macro expansion can break between Rust releases or users might not want to turn it on for performance reasons. It allows us to provide better diagnostics on any proc macro invocation we're not expanding (like a weak warning that informs the user that proc macro support is turned off, or that it has been disabled because the server crashed). Fixes https://github.com/rust-analyzer/rust-analyzer/issues/5763 Co-authored-by: Jonas Schievink <[email protected]>
| * | Add more comments about proc macro resolutionJonas Schievink2020-09-281-0/+20
| | |
| * | Simplify iterator chainJonas Schievink2020-09-281-5/+2
| | |
| * | Remove incorrect docsJonas Schievink2020-09-181-6/+0
| | |
| * | Reduce visibility of non-proc-macrosJonas Schievink2020-09-183-0/+85
| | | | | | | | | | | | | | | proc-macro crates only export proc-macros, but currently other items are also considered public (and show up in completion)
| * | Remove obsolete proc macro collection codeJonas Schievink2020-09-181-19/+0
| | | | | | | | | | | | The new attribute-based resolution takes care of this
| * | Use hir_def to resolve proc macrosJonas Schievink2020-09-183-16/+79
| | |
| * | Add testJonas Schievink2020-09-181-0/+32
| | |