aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | | | Update tests to reflect new completionsnathanwhit2020-04-221-1/+1
| | | | | | | |
| * | | | | | | Add tests for enum completionnathanwhit2020-04-221-0/+178
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds tests for completion of enum variants in match arms, if-let statements, and basic expressions.
| * | | | | | | Complete unqualified enum variants when possiblenathanwhit2020-04-221-5/+26
| | | | | | | |
| * | | | | | | Add utility fn for expected type of a nodenathanwhit2020-04-221-1/+12
| | |_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | Adds `expected_type_of` to `CompletionContext` to return the expected type of a node, if it is known.
* | | | | | | Remove SyntaxPtr::range from more placesAleksey Kladov2020-04-231-1/+1
| | | | | | |
* | | | | | | feat: run ignored testsHannes De Valkeneer2020-04-221-2/+33
| |_|_|_|_|/ |/| | | | |
* | | | | | Some clippy fixesJeremy Kolb2020-04-191-1/+1
| | | | | |
* | | | | | Fix goto definition for record patternsAleksey Kladov2020-04-181-6/+22
| | | | | |
* | | | | | Add semantic tag for unresolved referencesAleksey Kladov2020-04-184-20/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a quick way to implement unresolved reference diagnostics. For example, adding to VS Code config "editor.tokenColorCustomizationsExperimental": { "unresolvedReference": "#FF0000" }, will highlight all unresolved refs in red.
* | | | | | Merge #4029bors[bot]2020-04-181-0/+6
|\ \ \ \ \ \ | |/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4029: Fix various proc-macro bugs r=matklad a=edwin0cheng This PRs does the following things: 1. Fixed #4001 by splitting `LIFETIME` lexer token to two mbe tokens. It is because rustc token stream expects `LIFETIME` as a combination of punct and ident, but RA `tt:TokenTree` treats it as a single `Ident` previously. 2. Fixed #4003, by skipping `proc-macro` for completion. It is because currently we don't have `AstNode` for `proc-macro`. We would need to redesign how to implement `HasSource` for `proc-macro`. 3. Fixed a bug how empty `TokenStream` merging in `proc-macro-srv` such that no L_DOLLAR and R_DOLLAR will be emitted accidentally. Co-authored-by: Edwin Cheng <[email protected]>
| * | | | | Ignore proc-macro in completionEdwin Cheng2020-04-181-0/+6
| | | | | |
* | | | | | Merge #4026bors[bot]2020-04-181-1/+10
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4026: Omit more parameter hints in the presence of underscores r=matklad a=lnicola Fixes #4017. Co-authored-by: Laurențiu Nicola <[email protected]>
| * | | | | | Omit more parameter hints in the presence of underscoresLaurențiu Nicola2020-04-181-1/+10
| |/ / / / /
* / / / / / Fix incorrect order of syntax highlight rangesLeander Tentrup2020-04-172-1/+14
|/ / / / /
* | | | | Don\t suggest import itself as a completion for importAleksey Kladov2020-04-172-1/+40
| | | | |
* | | | | Merge #4010bors[bot]2020-04-171-6/+66
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4010: Fix handling of ranges in diagnostics r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * | | | | Correctly highlight ranges of diagnostics from macrosAleksey Kladov2020-04-171-6/+66
| | |_|_|/ | |/| | | | | | | | | | | | | closes #2799
* / | | | Better snippet when completing trait methodAleksey Kladov2020-04-171-9/+10
|/ / / /
* | | / Don't expose SyntaxNodePtr impl detailsAleksey Kladov2020-04-161-1/+1
| |_|/ |/| |
* | | Merge #3955bors[bot]2020-04-114-5/+22
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3955: Align grammar for record patterns and literals r=matklad a=matklad The grammar now looks like this [name_ref :] pat bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * | | Align grammar for record patterns and literalsAleksey Kladov2020-04-114-5/+22
| | |/ | |/| | | | | | | | | | | | | The grammar now looks like this [name_ref :] pat
* / | Remove #[should_panic] from call_info testsJeremy Kolb2020-04-111-6/+15
|/ /
* | Make records grammar more orthogonalAleksey Kladov2020-04-112-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | We used name [: expr] grammar before, now it is [name :] expr which makes things simpler
* | Merge pull request #3910 from lnicola/fn-named-param-hintAleksey Kladov2020-04-111-5/+12
|\ \ | | | | | | Hide parameter hints for single-argument functions with the same name
| * | Hide parameter hints for single-argument functions with the same nameLaurențiu Nicola2020-04-091-5/+12
| | |
* | | Rename some tokensAleksey Kladov2020-04-102-6/+6
| | |
* | | Semicolon tokenAleksey Kladov2020-04-101-1/+1
| | |
* | | Simpler acessors for keywordsAleksey Kladov2020-04-092-3/+3
| | |
* | | Drop needless traitAleksey Kladov2020-04-091-14/+16
|/ /
* | Merge #3901bors[bot]2020-04-091-6/+46
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3901: Add more heuristics for hiding obvious param hints r=matklad a=IceSentry This will now hide `value`, `pat`, `rhs` and `other`. These words were selected from the std because they are used in commonly used functions with only a single param and are obvious by their use. It will also hide the hint if the passed param **starts** or end with the param_name. Maybe we could also split on '_' and check if one of the string is the param_name. I think it would be good to also hide `bytes` if the type is `[u8; n]` but I'm not sure how to get the param type signature. Closes #3900 Co-authored-by: IceSentry <[email protected]>
| * | use .expr() to remove refIceSentry2020-04-091-5/+10
| | |
| * | clean up param hint checkingIceSentry2020-04-091-18/+18
| | |
| * | better `&mut ` and `&` matchingIceSentry2020-04-091-6/+6
| | |
| * | ignore `&mut ` and `&` when checking paramsIceSentry2020-04-091-3/+13
| | |
| * | remove TODOIceSentry2020-04-081-1/+0
| | |
| * | Add more heuristics for hiding obvious param hintsIceSentry2020-04-081-4/+30
| |/ | | | | | | | | | | | | This will now hide "value", "pat", "rhs" and "other" These words were selected from the std because they are used in common functions with only a single param and are obvious by their use. I think it would be good to also hide "bytes" if the type is `[u8; n]` but I'm not sure how to get the param type signature It will also hide the hint if the passed param starts or end with the param_name
* / Be consistent about token accesorsAleksey Kladov2020-04-093-3/+6
|/
* Merge #3826bors[bot]2020-04-085-51/+148
|\ | | | | | | | | | | | | | | | | | | | | | | | | 3826: Flatten nested highlight ranges during DFS traversal r=matklad a=ltentrup Implements the flattening of nested highlights from #3447. There is a caveat: I needed to add `Clone` to `HighlightedRange` to split highlight ranges ~and the nesting does not appear in the syntax highlighting test (it does appear in the accidental-quadratic test but there it is not checked against a ground-truth)~. I have added a test case for the example mentioned in #3447. Co-authored-by: Leander Tentrup <[email protected]>
| * Simplify HTML highlighter and add test case for highlight_injection logicLeander Tentrup2020-04-065-59/+97
| |
| * Flatten nested highlight ranges during DFS traversalLeander Tentrup2020-04-032-6/+65
| |
* | Move computation of missing fields into hirAleksey Kladov2020-04-071-50/+9
| |
* | Add functional update testAleksey Kladov2020-04-071-0/+33
| |
* | Fix names of test modulesAleksey Kladov2020-04-071-2/+2
| |
* | Merge #3878bors[bot]2020-04-074-7/+52
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3878: A more precise panic macro r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * | A more precise panic macroAleksey Kladov2020-04-071-1/+1
| | |
| * | Don't insert !() if there's already someAleksey Kladov2020-04-073-3/+45
| | |
| * | Reorder importsAleksey Kladov2020-04-071-3/+6
| | |
* | | missing match arms diagnosticJosh Mcguigan2020-04-071-1/+9
|/ /
* | Better naming for scope completionAleksey Kladov2020-04-073-4/+4
| |
* | Better naming for path completionAleksey Kladov2020-04-073-4/+4
| |