aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide
Commit message (Collapse)AuthorAgeFilesLines
...
* | minor, if let else -> matchAleksey Kladov2020-02-041-6/+3
| |
* | ra_syntax: refactored the lexer design as per @matklad and @kiljacken PR reviewVeetaha2020-02-031-2/+4
| |
* | Reimplemented lexer with vectors instead of iteratorsVeetaha2020-02-031-6/+4
| |
* | Fix inlay hints test snippet compilationKirill Bulatov2020-02-031-8/+8
| |
* | Avoid premature pessimizationAleksey Kladov2020-02-021-0/+2
| | | | | | | | | | | | The extra allocation for message should not matter here at all, but using a static string is just as ergonomic, if not more, and there's no reason to write deliberately slow code
* | Code review fixesKirill Bulatov2020-02-021-15/+11
| |
* | Require ModPath for importingKirill Bulatov2020-02-021-24/+47
| |
* | Re-sync queries for memory usage measurnmentAleksey Kladov2020-01-291-11/+40
| |
* | Improves reference search by StructLiteralMikhail Modin2020-01-271-27/+111
| |
* | Merge #2883bors[bot]2020-01-274-111/+208
|\ \ | | | | | | | | | | | | | | | | | | | | | 2883: Implement Syntax Highlight inside macro call r=matklad a=edwin0cheng Co-authored-by: Edwin Cheng <[email protected]>
| * | Implement Syntax Highlight inside MacroEdwin Cheng2020-01-204-111/+208
| | |
* | | Merge #2887bors[bot]2020-01-273-3/+81
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2887: Initial auto import action implementation r=matklad a=SomeoneToIgnore Closes https://github.com/rust-analyzer/rust-analyzer/issues/2180 Adds an auto import action implementation. This implementation is not ideal and has a few limitations: * The import search functionality should be moved into a separate crate accessible from ra_assists. This requires a lot of changes and a preliminary design. Currently the functionality is provided as a trait impl, more on that here: https://github.com/rust-analyzer/rust-analyzer/issues/2180#issuecomment-575690942 * Due to the design desicion from the previous item, no doctests are run for the new aciton (look for a new FIXME in the PR) * For the same reason, I have to create the mock trait implementaion to test the assist * Ideally, I think we should have this feature as a diagnostics (that detects an absense of an import) that has a corresponding quickfix action that gets evaluated on demand. Curretly we perform the import search every time we resolve the import which looks suboptimal. This requires `classify_name_ref` to be moved from ra_ide, so not done currently. A few improvements to the imports mechanism to be considered later: * Constants like `ra_syntax::SyntaxKind::NAME` are not imported, because they are not present in the database * Method usages are not imported, they are found in the database, but `find_use_path` does not return any import paths for them * Some import paths returned by the `find_use_path` method end up in `core::` or `alloc::` instead of `std:`, for example: `core::fmt::Debug` instead of `std::fmt::Debug`. This is not an error techically, but still looks weird. * No detection of cases where a trait should be imported in order to be able to call a method * Improve `auto_import_text_edit` functionality: refactor it and move away from the place it is now, add better logic for merging the new import with already existing imports Co-authored-by: Kirill Bulatov <[email protected]>
| * | | Code review fixesKirill Bulatov2020-01-271-1/+1
| | | |
| * | | Have a better trait interfaceKirill Bulatov2020-01-261-46/+24
| | | |
| * | | Raise the import search query capKirill Bulatov2020-01-261-2/+3
| | | |
| * | | Remove unnecessary lifetime parameterKirill Bulatov2020-01-261-1/+1
| | | |
| * | | Initial auto import action implementationKirill Bulatov2020-01-263-3/+102
| | | |
* | | | Update cratesJeremy Kolb2020-01-261-1/+1
|/ / /
* | | Merge #2899bors[bot]2020-01-251-1/+15
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2899: Provide more runners for potential tests r=matklad a=SomeoneToIgnore Based on the https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Fwg-rls-2.2E0/topic/Runners.20for.20custom.20test.20annotations discussion. Adds a test runner for every method that has an annotation that contains `test` word in it, allowing to run tests annotated with custom testing annotations such as `#[tokio::test]`, `#[test_case(...)]` and others at costs of potentially emitting some false-positives. Co-authored-by: Kirill Bulatov <[email protected]>
| * | | Provide more runners for potential testsKirill Bulatov2020-01-231-1/+15
| | |/ | |/|
* / | Cancel requests during shutdownAleksey Kladov2020-01-242-4/+9
|/ /
* / Omit default parameters for reference typesKirill Bulatov2020-01-221-1/+13
|/
* Improve parameter hints a bit & add emacs supportFlorian Diebold2020-01-182-17/+25
| | | | | - just include the name, not e.g. `mut` - don't return empty hints (or `_`)
* Create modules via SourceBinderAleksey Kladov2020-01-167-54/+37
|
* Move module to SourceBinderAleksey Kladov2020-01-163-21/+21
|
* Move more stuff to SourceBinderAleksey Kladov2020-01-161-2/+2
|
* More natural trait setupAleksey Kladov2020-01-161-3/+3
|
* Make FromSource privateAleksey Kladov2020-01-162-17/+18
|
* Micro-optimize type hints to avoid allocationsAleksey Kladov2020-01-161-39/+38
|
* Merge #2837bors[bot]2020-01-156-72/+105
|\ | | | | | | | | | | | | | | | | | | 2837: Accidentally quadratic r=matklad a=matklad Our syntax highlighting is accdentally quadratic. Current state of the PR fixes it in a pretty crude way, looks like for the proper fix we need to redo how source-analyzer works. **NB:** don't be scared by diff stats, that's mostly a test-data file Co-authored-by: Aleksey Kladov <[email protected]>
| * TyposAleksey Kladov2020-01-151-1/+1
| |
| * :arrow_up: once_cellAleksey Kladov2020-01-151-1/+3
| |
| * Add commentAleksey Kladov2020-01-151-0/+1
| |
| * Optimize inlay hintsAleksey Kladov2020-01-151-5/+6
| |
| * Only new-style classificationAleksey Kladov2020-01-155-28/+21
| |
| * Add a testAleksey Kladov2020-01-151-3/+20
| |
| * Make syntax highlighting linearAleksey Kladov2020-01-153-54/+73
| |
| * Introduce SourceBinderAleksey Kladov2020-01-151-1/+1
| |
* | itertools::Either -> either::EitherKirill Bulatov2020-01-151-1/+1
| |
* | Apply the api design suggestionsKirill Bulatov2020-01-151-8/+15
| |
* | Another attempt to add multiple editsKirill Bulatov2020-01-151-8/+27
|/
* Merge #2843bors[bot]2020-01-152-2/+159
|\ | | | | | | | | | | | | | | | | | | | | | | 2843: Add inlay parameter name hints for call expr r=matklad a=imtsuki This patch adds Intellij-like parameter name hints for literal values in function calls. <img width="624" alt="Screenshot" src="https://user-images.githubusercontent.com/8423594/72366533-68d7f800-3735-11ea-9279-cf193ca8ca2f.png"> Signed-off-by: imtsuki <[email protected]> Co-authored-by: imtsuki <[email protected]>
| * FnSignature: use unwrap_or_default for parameter_name_listimtsuki2020-01-151-5/+3
| | | | | | | | Signed-off-by: imtsuki <[email protected]>
| * Update test snapshotimtsuki2020-01-141-2/+2
| | | | | | | | Signed-off-by: imtsuki <[email protected]>
| * Add inlay parameter name hints for function callsimtsuki2020-01-142-2/+161
| | | | | | | | Signed-off-by: imtsuki <[email protected]>
* | Move Type API to typeAleksey Kladov2020-01-142-19/+24
| |
* | Move impls_future to Type, where it belongsAleksey Kladov2020-01-141-1/+1
| |
* | Use lang-items to resolve future traitAleksey Kladov2020-01-141-0/+1
|/
* Readabilitykjeremy2020-01-131-5/+5
|
* Some clippy lintskjeremy2020-01-136-41/+40
|