aboutsummaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
...
| * | 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-025-0/+36
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | | |
| * | | 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 #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
| | | |
* | | | Up rustc-ap-rustc_lexer to 681kjeremy2020-10-012-5/+5
| |/ / |/| | | | | | | | cargo update as well
* | | Fix MergingBehaviour::Last not working properlyLukas Wirth2020-09-301-21/+52
|/ /
* | Extend **Status** command to also show dep info for the fileAleksey Kladov2020-09-294-21/+59
| | | | | | | | This should help with troubleshooting wrong project configuration
* | Remove periodic gc stubAleksey Kladov2020-09-296-64/+13
| |
* | More panic_contextAleksey Kladov2020-09-291-1/+3
| |
* | Add panic_context module for better panic messagesAleksey Kladov2020-09-293-2/+55
|/
* 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-291-2/+2
|
* Add method references CodeLensvsrs2020-09-292-8/+68
|
* 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-281-3/+3
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-281-3/+3
| | |
* | | MicrooptimizeAleksey Kladov2020-09-281-6/+7
|/ /
* | chalk 0.29.0Jeremy Kolb2020-09-281-3/+3
| |
* | 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
| | |
* | | Merge #6085bors[bot]2020-09-281-0/+7
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6085: Mark unresolved imports diagnostic as experimental r=jonas-schievink a=jonas-schievink It causes a lot of false positives for people. We collected all of the known ones during the last week. Co-authored-by: Jonas Schievink <[email protected]>
| * | | Mark unresolved imports diagnostic as experimentalJonas Schievink2020-09-281-0/+7
| | | |
* | | | Spawn a flycheck instance per workspaceJonas Schievink2020-09-274-21/+46
| | | |
* | | | Merge #6073bors[bot]2020-09-255-55/+203
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6073: Dont unnecessarily unnest imports r=matklad a=Veykril Fixes #6071 This has the side effect that paths that refer to items inside of the current module get prefixed with `self`. Changing this behavior is unfortunately not straightforward should it be unwanted, though I don't see a problem with this as prefixing imports like this with `self` is what I do personally anyways 😅. You can see what I mean with this in one of the tests which had to be changed in `crates/ssr/src/tests.rs`. There is one test that i still have to look at though, ~~which I by accident pushed with `#[ignore]` on it~~, which is `different_crate_renamed`, for some reason this now doesn't use the crate alias. This also makes me believe that aliases in general will break with this. So maybe this is not as straight forwards as I'd hoped for, but I don't really know how aliases work here. Edit: The failing test should work now Co-authored-by: Lukas Wirth <[email protected]>
| * | | | Remove partial import test in insert_useLukas Wirth2020-09-251-10/+0
| | | | |
| * | | | Don't unnecessarily unnest imports for import insertionLukas Wirth2020-09-254-45/+203
| | | | |
* | | | | Merge #6076bors[bot]2020-09-252-5/+11
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6076: Update chalk to 0.28.0 r=matklad a=vandenheuvel Co-authored-by: Bram van den Heuvel <[email protected]>
| * | | | | Update chalk to 0.28.0Bram van den Heuvel2020-09-252-5/+11
| | | | | |
* | | | | | Merge #6055bors[bot]2020-09-251-0/+5
|\ \ \ \ \ \ | |/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6055: Add ok postfix completion r=matklad a=mullr Wrapping values in `Ok(...)` is so pervasive that it seems reasonable for it to have its own postfix completion. Co-authored-by: Russell Mull <[email protected]>
| * | | | | Cargo fmtRussell Mull2020-09-221-9/+2
| | | | | |