aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists/src
Commit message (Collapse)AuthorAgeFilesLines
...
* Stylistic changes. Updated features.md with the new assists.Marco Groppo2019-04-091-8/+6
|
* Add explicit type assist.Marco Groppo2019-04-082-0/+97
|
* remove flavorAleksey Kladov2019-04-021-2/+2
|
* add ast::tokensAleksey Kladov2019-04-022-8/+3
|
* intelligently add parens when inlining local varaiblesgfreezy2019-04-012-44/+391
|
* switch to new rowanAleksey Kladov2019-04-0112-56/+62
|
* Flip any binary expression except assignments.Marco Groppo2019-03-261-64/+56
|
* Assist to flip (some) binary expressions.Marco Groppo2019-03-253-88/+151
| | | | This assist can flip the following operators: ==, !=, >, >=, <, <=.
* Merge #1037bors[bot]2019-03-252-0/+300
|\ | | | | | | | | | | | | | | 1037: inline immutable local varialbe r=matklad a=gfreezy resolved #1033 Co-authored-by: gfreezy <[email protected]>
| * use | instead of multiple match armsgfreezy2019-03-251-27/+27
| |
| * inline immutable local varialbegfreezy2019-03-252-0/+300
| |
* | Merge #1036bors[bot]2019-03-252-0/+88
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | 1036: Assist to flip equality (==) and negated equality (!=) operands. r=matklad a=marcogroppo This PR adds an assist to flip the equality operands. I hope this is the right way to do this (I'm a newbie...) Fixes #1023. Co-authored-by: Marco Groppo <[email protected]>
| * Target only the actual operator.Marco Groppo2019-03-241-12/+11
| | | | | | | | | | Renamed `BinExpr::op()` and `PrefixExpr::op()` to `op_kind`. Now `op()` returns the `SyntaxNode`.
| * Minor formatting changes.Marco Groppo2019-03-241-1/+1
| |
| * Assist to flip equality (==) and negative equality (!=) operands.Marco Groppo2019-03-242-0/+89
| |
* | Add assist for adding default methodsgfreezy2019-03-232-3/+59
| |
* | Add impl members assist shold not copy docstrings, attrs and default methods.gfreezy2019-03-231-22/+42
|/
* Remove the old variants replaced by Ty::ApplyFlorian Diebold2019-03-212-12/+8
|
* Improve performance and orderingCaio2019-03-201-21/+15
|
* Fill partial fieldsCaio2019-03-201-32/+127
|
* Merge #989bors[bot]2019-03-182-0/+153
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 989: Implement naive version of fill_struct_fields assist r=matklad a=yanchith Fixes #964 This implements the `fill_struct_fields` assist. Currently only works for named struct fields, but not for tuple structs, because we seem to be missing a `TupleStructLit` (akin to `StructLit`, but for tuple structs). I am happy to implement `TupleStructLit` parsing given some guidance (provided it's really missing) and make the assist work for tuple structs as well. Could do so either in this PR, or another one 🙂 Sorry if I missed something important, this is my first PR for Rust Analyzer. Btw is there any way to run the assists in emacs? UPDATE: I just realized that parsing `TupleStructLit` would be quite difficult as it it really similar, if not identical to a function call... Co-authored-by: yanchith <[email protected]>
| * Only replace NamedFieldList and add test for preserving Selfyanchith2019-03-181-13/+45
| |
| * Remove unachievable TODOyanchith2019-03-181-1/+0
| |
| * Implement naive version of fill_struct_fields assistyanchith2019-03-172-0/+122
| |
* | Move the primary assist fn to the top of the fileIgor Matuszewski2019-03-161-30/+30
| |
* | Provide assist when cursor is immediately outside impl item blockIgor Matuszewski2019-03-161-14/+18
| |
* | Do a cleanup/legibility passIgor Matuszewski2019-03-161-21/+21
| |
* | Take into account parent indent when filling trait membersIgor Matuszewski2019-03-161-9/+41
| |
* | Simplify trait resolution fragmentIgor Matuszewski2019-03-161-6/+3
| |
* | Ignore unnamed trait fns and add more testsIgor Matuszewski2019-03-161-2/+70
| |
* | Simplify calculation of missing functionsIgor Matuszewski2019-03-161-9/+2
| | | | | | | | | | | | Asymptotically computing a set difference is faster but in the average case we won't have more than ~10 functions. Also prefer not using hash sets as these may yield nondeterministic results.
* | Properly support the case when the cursor is inside an empty block or outsideIgor Matuszewski2019-03-161-15/+44
| |
* | Redo indent calculation when adding missing impl membersIgor Matuszewski2019-03-161-9/+21
| |
* | Implement a simple working assistIgor Matuszewski2019-03-161-13/+59
| |
* | Calculate missing functions from impl bodyIgor Matuszewski2019-03-161-1/+62
| |
* | Add 'add_missing_impl_members' assist stubIgor Matuszewski2019-03-162-0/+43
|/
* rename syntax_mapping as wellAleksey Kladov2019-03-021-2/+2
|
* rename syntax-mapping -> source-mapAleksey Kladov2019-03-021-1/+1
|
* add marks to assistsAleksey Kladov2019-02-243-45/+41
|
* dont show introduce variable everywhereAleksey Kladov2019-02-242-46/+42
|
* Assign IDs to assistsAleksey Kladov2019-02-2412-26/+41
|
* Simplify test_fill_match_arm_refs test casesVille Penttinen2019-02-231-24/+0
|
* Fix fill_match_arms not working with referencesVille Penttinen2019-02-231-0/+103
|
* Move `non_trivia_sibling` to `ra_syntax::algo`Ville Penttinen2019-02-212-6/+3
|
* auto_import: fix bug when the common path was shorter than both the current ↵Andrea Pretto2019-02-141-18/+67
| | | | | | use and target path. Shorter test names.
* auto_import: import in enclosing module instead of fileAndrea Pretto2019-02-121-4/+38
|
* auto_import: more tests and some refactoringsAndrea Pretto2019-02-121-12/+46
|
* Fix some typosPascal Hertleif2019-02-122-5/+5
|
* ra_assists: assist "providers" can produce multiple assistsAndrea Pretto2019-02-1112-64/+144
|
* Merge #762bors[bot]2019-02-102-0/+732
|\ | | | | | | | | | | | | | | | | | | | | | | | | 762: "Dumb" auto import assist r=matklad a=eulerdisk This adds a new assist to "add xxx::yyy to the current file" when the cursor is on a PATH. It manages correctly nested imports,`self` keyword and creates new nested imports if necessary. [See the tests] It doesn't use name resolution so in that sense is 'dumb', but I have plans to do that. That in the future will be useful to auto import trait names in autocompletion for example. It can easily be extended to provide multiple actions to select in which scope to import. That's another thing I plan to do. @matklad I copied some indentation code from `ide_light`, I don't know at the moment if/how you want to refactor that code. This assist was meant to be in `ide_light`. Co-authored-by: Andrea Pretto <[email protected]>