aboutsummaryrefslogtreecommitdiff
path: root/crates/ide
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Merge #7778bors[bot]2021-03-011-0/+29
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7778: Fix lowering trailing self paths in UseTrees r=Veykril a=Veykril Noticed that hovering over `self` in a use tree like `use foo::bar::{self}` showing documentation and such for the current module instead of `bar`. Co-authored-by: Lukas Wirth <[email protected]>
| * | | Fix lowering trailing self paths in UseTreesLukas Wirth2021-02-281-0/+29
| | |/ | |/|
* | | Update vscode README with a small features listLukas Wirth2021-03-012-0/+18
| | |
* | | For unresolved macros, hightlight only the last segmentAleksey Kladov2021-02-281-11/+56
|/ /
* | Pickup ConstReference patterns in FindUsagesLukas Wirth2021-02-231-0/+25
| |
* | 7526: Renamed create ssr to ide_ssr.Chetan Khilosiya2021-02-222-4/+5
| |
* | 7526: Rename crate assists to ide_assists.Chetan Khilosiya2021-02-225-5/+5
| |
* | Merge #7732bors[bot]2021-02-201-2/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7732: Don't lower TypeBound::Lifetime as GenericPredicate::Error r=flodiebold a=Veykril Basically we just discard the typebound for now instead when lowering to `GenericPredicate`. I think this shouldn't have any other side effects? Fixes #7683(hopefully for real this time) I also played around with introducing `GenericPredicate::LifetimeOutlives` and `GenericPredicate::TypeOutlives`(see https://github.com/Veykril/rust-analyzer/commit/b9d69048451a5f2e9c5a72c800369bbeef36fdcf) but that won't fix this issue(at least not for now) due to lifetime predicate mismatches when resolving methods so I figure this is a good way to fix it for now. Co-authored-by: Lukas Wirth <[email protected]>
| * | Don't lower TypeBound::Lifetime as GenericPredicate::ErrorLukas Wirth2021-02-201-2/+2
| | |
* | | Remove documentation of obsolete extend selection commandLaurențiu Nicola2021-02-201-3/+5
|/ /
* | rename completion -> ide_completionAleksey Kladov2021-02-172-5/+5
| | | | | | | | We don't have completion-related PRs in flight, so lets do it
* | Merge #7699bors[bot]2021-02-172-58/+31
|\ \ | | | | | | | | | | | | | | | | | | | | | 7699: Implement ast::AstNode for NameLike and move it to node_ext r=matklad a=Veykril With this `search`(and 2 other modules) don't necessarily go through 3 calls of `find_node_at_offset_with_descend` to find the correct node. Also makes the code that searches for NameLikes a bit easier on the eyes imo, though that can be fixed with just a helper function as well so its not that relevant. Co-authored-by: Lukas Wirth <[email protected]>
| * | Implement ast::AstNode for NameLike and move it to node_extLukas Wirth2021-02-162-58/+31
| | |
* | | Merge #7705bors[bot]2021-02-171-2/+38
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7705: Show hover info of the definition of ConstReference patterns instead of its type r=Veykril a=Veykril Closes #7671 bors r+ Co-authored-by: Lukas Wirth <[email protected]>
| * | | Show hover info of the definition of ConstReference patterns instead of its typeLukas Wirth2021-02-171-2/+38
| |/ /
* / / Allow comments between newlines in chaining hintsPaco Soberón2021-02-161-16/+22
|/ /
* | Merge #7657bors[bot]2021-02-161-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7657: utf8 r=matklad a=matklad - Prepare for utf-8 offsets - reduce code duplication in tests - Make utf8 default, implement utf16 in terms of it - Make it easy to add additional context for offset conversion - Implement utf8 offsets closes #7453 Co-authored-by: Aleksey Kladov <[email protected]>
| * | Make utf8 default, implement utf16 in terms of itAleksey Kladov2021-02-161-1/+1
| | |
| * | Prepare for utf-8 offsetsAleksey Kladov2021-02-161-1/+1
| | |
* | | Fix a few clippy::perf warningskjeremy2021-02-164-5/+7
|/ /
* | Actually fix runnable orderivan7702021-02-151-20/+20
| |
* | Merge #7656bors[bot]2021-02-141-100/+170
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7656: Implement constructor usage search for almost all items r=matklad a=Veykril This PR moves the filering for enum constructors to the HIR, with this unprefixed variants as well as when the enum has been renamed via use will then still show up properly. We now walk the ast of the `NameRef` up until we find a `PathExpr`(which also handles `CallExpr` for tuple-type structs and variants already) or a `RecordExpr`. For enum search we then take the `path` out of that expression and do a resolution on it to compare it with the definition enum. With this PR we now support searching for all constructor literals, Unit-, Tuple- and Record-Structs, Unit-, Tuple- and Record-Variants as well as Unions. There is one shortcoming due to how the search is triggered. Unit Variants constructors can't be searched as we have no position for it to kick off the search(since a comma doesn't have to exist for the last variant). Closes #2549 though it doesn't implement it as outlined in the issue since the reference kind was removed recently, though I believe the approach taken here is better personally. Co-authored-by: Lukas Wirth <[email protected]>
| * | Only use HIR when searching for enum constructors, otherwise fall back to ASTLukas Wirth2021-02-131-48/+34
| | |
| * | Implement constructor usage search for almost all itemsLukas Wirth2021-02-121-105/+189
| | | | | | | | | | | | | | | | | | | | | For all struct kinds, unions and enums, as well as for record- and tuple-variants but not for unit-variants, as these have no trailing character we can anchor the search to. Functionality wise it is implemented though.
* | | Merge #7668bors[bot]2021-02-141-48/+131
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7668: Finalize rename infra rewrite r=matklad a=Veykril This should be the final PR in regards to rewriting rename stuff, #4290. It addresses 3 things: - Currently renaming import aliases causes some undesired behavior(see #5198) which is why this PR causes us to just return an error if an attempt at renaming an alias is made for the time being. Though this only prevents it from happening when the alias import is renamed, so its not too helpful. - Fixes #6898 - If we are inside a macro file simply rename the input name node as there isn't really a way to do any of the fancy shorthand renames and similar things as for that we would have to exactly know what the macro generates and what not. Co-authored-by: Lukas Wirth <[email protected]>
| * | | Don't rename field record patterns directlyLukas Wirth2021-02-131-36/+71
| | | |
| * | | Fallback to renaming input NameRef node for macros when inside macroLukas Wirth2021-02-131-16/+53
| | | |
| * | | Prevent aliases from being renamed for nowLukas Wirth2021-02-131-13/+24
| | | |
* | | | Don't classify attribute macros as their path unless it's a function with ↵Lukas Wirth2021-02-131-0/+35
|/ / / | | | | | | | | | the proc_macro_attribute attribute
* | | Make annotations tests similar to those in runnablesivan7702021-02-131-188/+707
| | |
* | | Improve runnable annotations order, fix incorrect ignore detectionivan7702021-02-131-5/+13
| | |
* | | Added annotation testsivan7702021-02-131-0/+267
| | |
* | | Fix incorrect references annotationivan7702021-02-131-2/+3
| | |
* | | Moved CodeLens to ide crateivan7702021-02-132-0/+156
|/ /
* | Update references test outputLukas Wirth2021-02-121-2/+2
| |
* | Use NameLike in FileReference directly as its not exported from ide anymoreLukas Wirth2021-02-123-14/+8
| |
* | Refactor reference searching to work with the astLukas Wirth2021-02-124-256/+310
| |
* | Remove unused ReferenceSearchResult functionsLukas Wirth2021-02-121-24/+5
| |
* | Merge #7644bors[bot]2021-02-122-4/+3
|\ \ | | | | | | | | | | | | | | | | | | | | | 7644: Primitive completion r=jonas-schievink a=jonas-schievink Fixes https://github.com/rust-analyzer/rust-analyzer/issues/7642 Co-authored-by: Jonas Schievink <[email protected]>
| * | Wrap `BuiltinType` in code modelJonas Schievink2021-02-112-4/+3
| | |
* | | Pin Rust to 1.49.0 on CIJonas Schievink2021-02-121-3/+3
|/ /
* | Update fixed testsJonas Schievink2021-02-101-0/+1
| |
* | Resolve TupleStructPat in SourceAnalyzer::resolve_pathLukas Wirth2021-02-101-0/+23
| |
* | Add parsing benchmarkAleksey Kladov2021-02-091-5/+32
| |
* | Infra for "unit" benchmarkingAleksey Kladov2021-02-091-10/+12
| |
* | restore accidentally deleted testAleksey Kladov2021-02-091-0/+13
| |
* | More precise navigation to parentAleksey Kladov2021-02-093-10/+13
| |
* | Cleanup testsAleksey Kladov2021-02-093-55/+53
| |
* | Cleanup testAleksey Kladov2021-02-091-20/+21
| |
* | Modernize testsAleksey Kladov2021-02-091-197/+169
| |