aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Get rid of MockAnalysisAleksey Kladov2020-10-0219-420/+288
| | |
| * | Rewrite fixtures on top of ChangeAleksey Kladov2020-10-021-83/+90
| | |
| * | Move ide::AnalysisChange -> base_db::ChangeAleksey Kladov2020-10-0211-93/+122
| | | | | | | | | | | | | | | | | | This seems like a better factoring logically; ideally, clients shouldn't touch `set_` methods of the database directly. Additionally, I think this should remove the unfortunate duplication in fixture code.
* | | Merge #6122bors[bot]2020-10-021-176/+181
|\| | | | | | | | | | | | | | | | | | | | | | | | | | 6122: Expectify find_references tests r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * | Expectify find_references testsAleksey Kladov2020-10-021-176/+181
|/ /
* | Merge #6121bors[bot]2020-10-022-13/+14
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | 6121: Reduce visibiity r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * | Reduce visibiityAleksey Kladov2020-10-022-13/+14
|/ /
* | Merge #5988bors[bot]2020-10-023-2/+338
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5988: Postfix completions for fmt-like string literals r=matklad a=popzxc This pull request adds a bunch of new postfix completions for `format`-like string literls. For example, `"{32} {some_var:?}".println` will expand to `println!("{} {:?}", 32, some_var)`. Postfix completions were added for most common format-like macros: - `println` -> `println!(...)` - `fmt` -> `format!(...)` - `panic` -> `panic!(...)` - `log` macros: + `logi` -> `log::info!(...)` + `logw` -> `log::warn!(...)` + `loge` -> `log::error!(...)` + `logt` -> `log::trace!(...)` + `logd` -> `log::debug!(...)` ![fmt_postfix](https://user-images.githubusercontent.com/12111581/92998650-a048af80-f523-11ea-8fd8-410146de8caa.gif) Co-authored-by: Igor Aleksanov <[email protected]>
| * | Use expect_test to make format_str_parser test more data-drivenIgor Aleksanov2020-10-021-35/+35
| | |
| * | Use lookup table instead of enum for postfix completion kindsIgor Aleksanov2020-10-021-62/+20
| | |
| * | Use ast::String for extracting string literal contentsIgor Aleksanov2020-10-022-14/+19
| | |
| * | Improve format-like completions code appearanceIgor Aleksanov2020-10-022-32/+26
| | |
| * | Add missing entry to doc-commentIgor Aleksanov2020-10-021-0/+1
| | |
| * | Simplify is_string_literal functionIgor Aleksanov2020-10-021-9/+5
| | |
| * | Improve checks for postfix suggestionsIgor Aleksanov2020-10-023-16/+23
| | |
| * | Add postfix completion for format-like string literalsIgor Aleksanov2020-10-023-1/+376
| | |
* | | Merge #5954bors[bot]2020-10-0210-2/+67
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5954: Add flexible configuration for runnables r=popzxc a=popzxc This PR introduces two new configuration options for runnables: `overrideCargo` and `cargoExtraArgs`. These options are applied to all the "run" tasks of rust analyzer, such as binaries and tests. Overall motivation is that rust-analyzer provides similar options, for example, for `rustfmt`, but not for runnables. ## `overrideCargo` This option allows user to replace `cargo` command with something else (well, something that is compatible with the cargo arguments). Motivation is that some projects may have wrappers around cargo (or even whole alternatives to cargo), which do something related to the project, and only then run `cargo`. With this feature, such users will be able to use lens and run tests directly from the IDE rather than from terminal. ![cargo_override](https://user-images.githubusercontent.com/12111581/92306622-2f404f80-ef99-11ea-9bb7-6c6192a2c54a.gif) ## `cargoExtraArgs` This option allows user to add any additional arguments for `cargo`, such as `--release`. It may be useful, for example, if project has big integration tests which take too long in debug mode, or if any other `cargo` flag has to be passed. ![cargo_extra_args](https://user-images.githubusercontent.com/12111581/92306658-821a0700-ef99-11ea-8be9-bf0aff78e154.gif) Co-authored-by: Igor Aleksanov <[email protected]>
| * | | Fix failing testIgor Aleksanov2020-10-021-0/+6
| | | |
| * | | 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 #6105bors[bot]2020-10-021-48/+85
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6105: Fix path comparison not comparing paths correctly with unequal lengths r=matklad a=Veykril ~~This PR includes the commit from #6102 there as I found a bug while writing that(so either merging this or both in order works) so I included a test there already which was just ignored.~~ This PR fixes that, basically inserting imports didn't consider path length for equality, so depending on the order it might insert the path before or after another import if they only differ in segment length. ~~Diff without the commit of #6102 https://github.com/rust-analyzer/rust-analyzer/commit/2d90d3937d71f9a00f3d44c15b20679215311637~~ Co-authored-by: Lukas Wirth <[email protected]>
| * | Fix path comparison not comparing paths correctly with unequal lengthsLukas Wirth2020-10-011-48/+85
| | |
* | | 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
| | |