aboutsummaryrefslogtreecommitdiff
path: root/crates/assists/src/utils
Commit message (Collapse)AuthorAgeFilesLines
* Remove the fixmeKirill Bulatov2020-11-121-36/+15
|
* Add a FIXME for non-unified inner attributesKirill Bulatov2020-11-121-2/+7
|
* Do not insert imports before inner commentsKirill Bulatov2020-11-121-18/+92
|
* Make insert_use return a SyntaxRewriterLukas Wirth2020-11-021-13/+18
|
* Remove more unreachable pubsAleksey Kladov2020-11-022-5/+5
|
* Fix indentation of inserted use statementsFlorian Diebold2020-10-241-34/+132
|
* Properly qualify trait methods in qualify_path assistLukas Wirth2020-10-151-23/+17
|
*-. Merge #6207 #6224 #6226 #6227bors[bot]2020-10-141-0/+268
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6207: Extract ImportAssets out of auto_import r=matklad a=Veykril See https://github.com/rust-analyzer/rust-analyzer/pull/6172#issuecomment-707182140 I couldn't fully pull out `AssistContext` as `find_node_at_offset_with_descend`: https://github.com/rust-analyzer/rust-analyzer/blob/81fa00c5b5d5ffb559a39c7ff5190a2519a8ea61/crates/assists/src/assist_context.rs#L90-L92 requires the `SourceFile` which is private in it and I don't think making it public just for this is the right call? 6224: :arrow_up: salsa r=matklad a=matklad bors r+ 🤖 6226: Add reminder to update lsp-extensions.md r=matklad a=matklad bors r+ 🤖 6227: Reduce bors timeout r=matklad a=matklad bors r+ 🤖 Co-authored-by: Lukas Wirth <[email protected]> Co-authored-by: Aleksey Kladov <[email protected]>
* | | Fix stackoverflow in insert_use::recursive_mergeLukas Wirth2020-10-141-2/+22
| |/ |/|
* | Fix MergeBehaviour::Full not working when merging nested long pathsLukas Wirth2020-10-131-3/+32
| |
| * Slightly cleanup import_assets moduleLukas Wirth2020-10-131-56/+78
| |
| * Adhere to style guidelines in import_assetsLukas Wirth2020-10-131-37/+29
| |
| * Extract ImportAssets out of auto_importLukas Wirth2020-10-131-0/+254
|/
* Fix path comparison not comparing paths correctly with unequal lengthsLukas Wirth2020-10-011-48/+85
|
* Fix MergingBehaviour::Last not working properlyLukas Wirth2020-09-301-21/+52
|
* Remove partial import test in insert_useLukas Wirth2020-09-251-10/+0
|
* Merge #5989bors[bot]2020-09-161-84/+272
|\ | | | | | | | | | | | | | | | | | | 5989: Rewrite import merging r=jonas-schievink a=Veykril Rewrites how import merging is being handled. It is now a recursive function to properly handle merging of intermediate levels in the import trees. With this ordering the imports is also now possible tho it doesn't quite order it the same way as `rustfmt` does yet, namely it orders lowercase identifiers after uppercase identifiers as that is the standard character order that rust uses. This also fixes a few weird behaviors that were visible in some of the `replace_qualified_name_with_use.rs` tests. This really took longer than I was hoping for, fighting with import trees is quite the exhausting task 😅 Co-authored-by: Lukas Wirth <[email protected]>
| * Add make::glob_use_tree function to create star-only UseTreeLukas Wirth2020-09-161-11/+3
| |
| * Fix merge imports failing if the `self` module import is in the wrong treeLukas Wirth2020-09-121-22/+34
| |
| * Tidy up `recursive_merge` implementationLukas Wirth2020-09-121-60/+60
| |
| * Reimplement import merging by making it recursive properly nesting all levelsLukas Wirth2020-09-121-64/+248
| |
* | Make MergeBehaviour configurableLukas Wirth2020-09-121-1/+1
|/
* Allow merge_imports assists to merge imports of equal visibilityLukas Wirth2020-09-051-6/+11
|
* Remove duplicated import merge logicLukas Wirth2020-09-051-2/+7
|
* Fix segment_iter not iterating segments properlyLukas Wirth2020-09-051-5/+16
|
* Add extra insert_use test for pub(crate) re-export handlingLukas Wirth2020-09-031-8/+14
|
* Fix import insertion breaking nested modulesLukas Wirth2020-09-031-43/+95
|
* Fix inserting imports in front of inner attributesLukas Wirth2020-09-031-1/+51
|
* Replace insert_use_statement with the new insert_useLukas Wirth2020-09-031-8/+10
|
* Impl make::blank_lineLukas Wirth2020-09-031-25/+8
|
* Use mark to check that paths that are too long will not be mergedLukas Wirth2020-09-031-0/+13
|
* Tidy up tests and apply suggested changesLukas Wirth2020-09-031-72/+107
|
* Add more import insertion testsLukas Wirth2020-09-031-3/+68
|
* Begin refactor of import insertionLukas Wirth2020-09-031-468/+440
|
* Don't expose hir::Path out of hirAleksey Kladov2020-08-151-3/+2
| | | | | | | | | | | | | | Conjecture: it's impossible to use hir::Path *correctly* from an IDE. I am not entirely sure about this, and we might need to add it back at some point, but I have to arguments that convince me that we probably won't: * `hir::Path` has to know about hygiene, which an IDE can't set up properly. * `hir::Path` lacks identity, but you actually have to know identity to resolve it correctly
* Rename ra_assists -> assistsAleksey Kladov2020-08-131-0/+547