aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide
Commit message (Collapse)AuthorAgeFilesLines
...
* Merge #2580bors[bot]2019-12-173-3/+3
|\ | | | | | | | | | | | | | | 2580: Fix highlighting token names r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * Fix highlighting token namesAleksey Kladov2019-12-173-3/+3
| |
* | Merge #2562bors[bot]2019-12-172-45/+73
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | 2562: Fix NavigationTarget ranges r=matklad a=edwin0cheng Fix the issue described in https://github.com/rust-analyzer/rust-analyzer/pull/2544#issuecomment-565572553 This PR change the order for finding `full_range` of `focus_range` in following orders: 1. map both ranges to macro_call 2. map focus range to a token inside macro call, and full range to the whole of macro call 3. map both ranges to the whole of macro call And fix the corresponding tests and make these tests easily to follow. Co-authored-by: Edwin Cheng <[email protected]>
| * Use simpler logic on original_rangeEdwin Cheng2019-12-142-56/+46
| |
| * Re-export Origin to replace ExpansionOriginEdwin Cheng2019-12-141-2/+2
| |
| * Fix original_source find orderEdwin Cheng2019-12-143-47/+85
| |
* | use a module instead of prefixed consts.Omer Ben-Amram2019-12-151-66/+64
| |
* | introduce named constants for highlighting tag names.Omer Ben-Amram2019-12-151-37/+67
| |
* | Merge #2559bors[bot]2019-12-153-17/+27
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2559: Add some granularity to syntax highlighting. r=matklad a=omerbenamram Hi, I wanted to start using `rust-analyzer` a bit more frequently - one of the main blockers for me so far was the highlighting. I just discovered it's possible to override the default colors with `ralsp.<something>` setting without waiting for #2061! However, the current implementation was lumping a bunch of different tokens into `type` and `literal`. The golden standard IMO is what Clion is currently doing (and is my current daily driver for rust). Clion allows users to control the coloring for specific literal kinds, and the default is to distinguish between them (numerics get a different color from strings, and special colors for bytestrings). I've also splitted the builtin types, which are also allowed to be highlighted speratly. My goal is to match the default experience I'm getting with clion. The only blockers now I think is that `rust-analyzer` doesn't corrently infer types in some situations, so the highlighting information is incorrect in those cases. This is what it looks like so far (with colors overriden to match clion's theme): ![image](https://user-images.githubusercontent.com/2467993/70848219-ccd97900-1e76-11ea-89e1-2e467cfcc9fb.png) If there are any other changes you feel is necessary let me know. I did leave the default colors to match the current behavior, since I'm not familiar with the colors for this theme, I added some random (different) colors in the test to check that it indeed was working. Co-authored-by: Omer Ben-Amram <[email protected]>
| * | fixed rainbow-highlighting testOmer Ben-Amram2019-12-151-0/+2
| | |
| * | removed `type.alias`Omer Ben-Amram2019-12-142-14/+18
| | |
| * | added decorationsOmer Ben-Amram2019-12-141-2/+2
| | |
| * | scopes resolution is more granularOmer Ben-Amram2019-12-131-8/+12
| |/
* | Merge #2561bors[bot]2019-12-141-4/+3
|\ \ | | | | | | | | | | | | | | | | | | | | | 2561: Split generic and non-generic paths r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * | Use different types for path with and without genericsAleksey Kladov2019-12-141-4/+3
| |/
* | for goto and hover pick the token based on a prioritysucccubbus2019-12-133-17/+46
| |
* | add tests for goto on tuple fieldssucccubbus2019-12-132-1/+33
| |
* | try both surrounding tokens for hoversucccubbus2019-12-131-4/+12
| |
* | add failing testsucccubbus2019-12-131-0/+7
| |
* | use find() instead of filter().next()succcubbus2019-12-131-1/+1
| |
* | fix goto definition when inbetween tokenssucccubbus2019-12-132-4/+28
|/ | | | | | | | fixes both goto_definition and goto_type_definition. before, when running goto between some non-trivia token and an identifier, goto would be attempted for the non-trivia token. but this does not make sense for e.g. L_PAREN or COLONCOLON only for IDENTs. now only IDENTs will be searched for in goto actions.
* Map first and last node in original_rangeEdwin Cheng2019-12-121-17/+36
|
* Fixed #2250Gabriel Luo2019-12-111-12/+66
| | | | | Tuple in type annotation expands correctly; Expansion will prefer the following delimiter when possible. New regression tests added to verify the consistency between tuple expansion in type annotation and tuple expansion in rvalue.
* Report correct original range in goto_definitionAleksey Kladov2019-12-091-9/+7
|
*---. Merge #2500 #2505 #2506bors[bot]2019-12-083-16/+3
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2500: Fix format_args expansion & go to definition r=matklad a=flodiebold The expansion of format_args wasn't yet correct enough to type-check. Also make macros in statement position expand to expressions for now, since it's not handled correctly in HIR lowering yet. This finally fixes go to definition within print macros, I think :slightly_smiling_face: 2505: Remove more dead code r=matklad a=matklad 2506: Remove one more Ty r=matklad a=matklad Co-authored-by: Florian Diebold <[email protected]> Co-authored-by: Aleksey Kladov <[email protected]>
| | | * Remove one more TyAleksey Kladov2019-12-081-1/+1
| | |/
| | * Remove more dead codeAleksey Kladov2019-12-081-13/+1
| |/ |/|
| * Fix range in goto_through_format testFlorian Diebold2019-12-081-1/+1
| |
| * Fix expansion of format_argsFlorian Diebold2019-12-081-1/+0
|/
* Remove ty from code_modelAleksey Kladov2019-12-081-1/+1
|
* Cleanup Crate APIAleksey Kladov2019-12-081-10/+6
|
* Rename GenericParam -> TypeParamAleksey Kladov2019-12-078-13/+13
| | | | We don't have LifetimeParam yet, but they are planned!
* Get the right analyzer for implsAleksey Kladov2019-12-073-1/+18
|
* Classify name works for TypeParamsAleksey Kladov2019-12-071-0/+9
|
* Gotodef for TypeParametersAleksey Kladov2019-12-071-7/+18
|
* ToNav for GenericParamAleksey Kladov2019-12-071-1/+21
|
* Show type hints for & patternsAleksey Kladov2019-12-071-16/+15
|
* Make the goto_through_format test actually fail :(Florian Diebold2019-12-061-0/+3
|
* Try to make go to definition work in format!Florian Diebold2019-12-061-0/+27
| | | | | | | SourceAnalyzer didn't work properly within expression macro expansions because it didn't find the enclosing function. Fix this by going up the expansion chain to find ancestors. This makes the test work, but apparently in real usage it's still not working.
* One pub function less is good!ice10002019-12-051-2/+3
|
* No block at the momentice10002019-12-043-7/+1
|
* Add `ModuleSource::Block`ice10002019-12-043-29/+21
|
* Run rustfmt with respect to Cargo.toml editionVincent Rouillé2019-12-041-0/+5
|
* Replace `ra_hir_expand::either` with crateice10002019-12-033-5/+8
|
* Add tests for checking the impl self typeFlorian Diebold2019-12-021-0/+33
|
* Push identifier check to rename functionWilco Kusee2019-11-292-9/+9
|
* Test rename for various identifiersWilco Kusee2019-11-291-0/+43
|
* Move identifier check to analysisWilco Kusee2019-11-291-1/+8
|
* Rename Source -> InFileAleksey Kladov2019-11-2816-41/+41
|
* Use Name::missing consistentlyAleksey Kladov2019-11-272-9/+3
|