aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | Handle #![cfg] in crate rootJonas Schievink2020-10-262-2/+22
| | | | |
* | | | | Merge #6313bors[bot]2020-10-2621-24/+77
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6313: Latest proposed LSP 3.16.0 and refresh semantic tokens r=matklad a=kjeremy Needs: https://github.com/gluon-lang/lsp-types/pull/183 Co-authored-by: kjeremy <[email protected]> Co-authored-by: Jeremy A. Kolb <[email protected]>
| * | | | Update testsJeremy A. Kolb2020-10-2610-0/+22
| | | | |
| * | | | Request a refresh of semantic tokens if things are loaded upkjeremy2020-10-262-0/+16
| | | | |
| * | | | Update packagekjeremy2020-10-262-12/+12
| | | | |
| * | | | Latest proposed LSP 3.16.0kjeremy2020-10-269-24/+39
| | | | | | | | | | | | | | | | | | | | Needs: https://github.com/gluon-lang/lsp-types/pull/183
* | | | | Merge #6333bors[bot]2020-10-264-8/+141
|\ \ \ \ \ | |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6333: Don't interpret type path as part of visibility. r=matklad a=ArifRoktim This closes #5902. I only check that the next token isn't equal to `T![:]`, instead of the next two not being equal to `T![::]`. Is that ok? Co-authored-by: Arif Roktim <[email protected]>
| * | | | Allow assist move_arm_cond_to_match_guard inside blocksArif Roktim2020-10-241-7/+80
| | | | |
| * | | | Don't interpret type path as part of visibility.Arif Roktim2020-10-243-1/+61
| | | | |
* | | | | Merge #6347bors[bot]2020-10-261-24/+141
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6347: Support insertion in SyntaxRewriter r=Veykril a=Veykril Co-authored-by: Lukas Wirth <[email protected]>
| * | | | | Remove InsertPos::Before variant in Syntax RewriterLukas Wirth2020-10-241-13/+20
| | | | | |
| * | | | | Support insertion in SyntaxRewriterLukas Wirth2020-10-241-24/+134
| | | | | |
* | | | | | Merge #6350bors[bot]2020-10-261-126/+123
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6350: Make IncorrectDiagnostic match rustc by copying rustc's code. r=popzxc a=ArifRoktim This closes #6343 and closes #6345. The old algorithm which used a `DetectedCase` enum, didn't match how rustc thinks of cases. Some inputs can be interpreted as more than 1 case depending on the situation. For example, to rustc: - `ABCD`: Can be both camel case and upper snake case - `X86_64`: Can be both camel case and upper snake case I could've made `detect_case` return a collection of `DetectedCase` and then modified the other code as such, but I think using the same code rustc uses is simpler and a surefire way to achieve the same diagnostics as rustc. Co-authored-by: Arif Roktim <[email protected]>
| * | | | | Make IncorrectDiagnostic match rustc by copying rustc's code.Arif Roktim2020-10-251-126/+123
| |/ / / /
* | | | | Merge #6360bors[bot]2020-10-263-1/+14
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6360: Fix unary minus highlighting r=matklad a=Veykril Fixes #6358 Co-authored-by: Lukas Wirth <[email protected]>
| * | | | | Fix unary minus highlightingLukas Wirth2020-10-253-1/+14
| | | | | |
* | | | | | Merge #6361bors[bot]2020-10-261-1/+19
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6361: Textmate grammar: angle bracket fix (closes #6323) r=dustypomerleau a=dustypomerleau Fixes #6323 After tinkering, it became clear that `<` and `>` should really default to the punctuation interpretation in the vast majority of cases. In addition, the breakage is greater when an angle bracket is missed. So, rather than optimizing for a type parameter `meta` scope and considering every possible parent scope and child scope, the easier fix was to narrow the case where `<` and `>` are treated as comparison operators. Co-authored-by: Dusty Pomerleau <[email protected]>
| * | | | | | fix: narrow the case where angle brackets are seen as comparison operatorsDusty Pomerleau2020-10-261-1/+19
|/ / / / / /
* | | | | | Merge #6357bors[bot]2020-10-251-3/+84
|\ \ \ \ \ \ | |/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6357: Don't keep parens around with remove-dbg r=SomeoneToIgnore a=Veykril Fixes #6355 ~~This causes remove-dbg to not keep parentheses when it comes to ranges though due to ranges not having `DOT2` and `DOT2EQ` tokens but having two `DOT` tokens inside of macro invocations.~~ Co-authored-by: Lukas Wirth <[email protected]>
| * | | | | Keep parens around in remove-dbg for range expressionsLukas Wirth2020-10-251-8/+9
| | | | | |
| * | | | | Don't keep parens around in remove-dbgLukas Wirth2020-10-251-1/+61
| | | | | |
| * | | | | Don't keep parens around with remove-dbg when encountering method chainingLukas Wirth2020-10-251-0/+20
|/ / / / /
* | | | | Merge #6354bors[bot]2020-10-254-1/+29
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6354: Add tracing to main rust-analyzer binary r=flodiebold a=flodiebold This makes `CHALK_DEBUG` logging work again e.g. when running `analysis-stats`, which is very helpful for debugging. This change shouldn't regress compile times at all. The reason for that is that chalk-solve already pulls in these crates, and while that's behind a feature (mostly for our benefit, I think) we never actually disabled that feature :sweat_smile: So alternatively, we could disable the feature and maybe get an improvement in compile times. In my test I just did to see the impact of that, this PR actually compiled faster than the one just removing tracing though, so it's probably not a big deal. Co-authored-by: Florian Diebold <[email protected]>
| * | | | | Add tracing to main rust-analyzer binaryFlorian Diebold2020-10-254-1/+29
|/ / / / /
* | | | | Merge #6353bors[bot]2020-10-251-8/+9
|\ \ \ \ \ | |_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6353: Get rid of FAKE_PLACEHOLDER r=flodiebold a=flodiebold The lifetime placeholder can be replaced by the static lifetime, and for array sizes we should just be using a concrete const. Co-authored-by: Florian Diebold <[email protected]>
| * | | | Get rid of FAKE_PLACEHOLDERFlorian Diebold2020-10-251-8/+9
|/ / / / | | | | | | | | | | | | | | | | The lifetime placeholder can be replaced by the static lifetime, and for array sizes we should just be using a concrete const.
| | | |
| \ \ \
*-. \ \ \ Merge #6331 #6342bors[bot]2020-10-2467-259/+421
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6331: correct hover text for items with doc attribute with raw strings r=matklad a=JoshMcguigan Fixes #6300 by improving the handling of raw string literals in attribute style doc comments. This still has a bug where it could consume too many `"` at the start or end of the comment text, just as the original code had. Not sure if we want to fix that as part of this PR or not? If so, I think I'd prefer to add a unit test for either the `as_simple_key_value` function (I'm not exactly sure where this would belong / how to set this up) or create a `fn(&SmolStr) -> &SmolStr` to unit test by factoring out the `trim` operations from `as_simple_key_value`. Thoughts on this? 6342: Shorter dependency chain r=matklad a=popzxc Continuing implementing suggestions from the `Completion refactoring` zulip thread. This PR does the following: - Removes dependency of `completions` on `assists` by moving required functionality into `ide_db`. - Moves completely `call_info` crate into `ide_db` as it looks like it fits perfect there. - Adds a bunch of new tests and docs. - Adds the re-export of `base_db` to the `ide_db` and removes direct dependency on `base_db` from other crates. The last point is controversial, I guess, but I noticed that in places where `ide_db` is used, `base_db` is also *always* used. Thus I think the dependency on the `base_db` is implied by the fact of `ide_db` interfaces, and thus it makes sense to just provide `base_db` out of the box. Co-authored-by: Josh Mcguigan <[email protected]> Co-authored-by: Igor Aleksanov <[email protected]>
| | * | | | Re-export base_db from ide_dbIgor Aleksanov2020-10-2452-74/+69
| | | | | |
| | * | | | Add tests for traits functions in ide_dbIgor Aleksanov2020-10-241-0/+149
| | | | | |
| | * | | | Make call_info a part of ide_dbIgor Aleksanov2020-10-2411-53/+14
| | | | | |
| | * | | | Remove dependency on 'assists' from 'completion' crateIgor Aleksanov2020-10-2412-129/+151
| | | | | |
| * | | | | correct hover for items with doc attribute with raw stringsJosh Mcguigan2020-10-242-3/+38
| | |_|/ / | |/| | |
* | | | | Merge #6344bors[bot]2020-10-245-52/+102
|\ \ \ \ \ | |_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6344: Bump deps r=matklad a=lnicola Co-authored-by: Laurențiu Nicola <[email protected]>
| * | | | Bump chalkLaurențiu Nicola2020-10-242-11/+11
| | | | |
| * | | | Bump rustc_lexerLaurențiu Nicola2020-10-242-3/+3
| | | | |
| * | | | Bump depsLaurențiu Nicola2020-10-243-38/+88
| | |/ / | |/| |
* | | | Merge #6337bors[bot]2020-10-242-37/+135
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | 6337: Fix indentation of inserted use statements r=flodiebold a=flodiebold Co-authored-by: Florian Diebold <[email protected]>
| * | | Fix indentation of inserted use statementsFlorian Diebold2020-10-242-37/+135
|/ / /
* | | Merge #6330bors[bot]2020-10-241-16/+17
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6330: Textmate grammar: raw IDs, underscore fixes (closes #6293, #6340) r=dustypomerleau a=dustypomerleau Fixes https://github.com/rust-analyzer/rust-analyzer/issues/6293. I've included the possibility of the `r#` prefix in: - function definitions - function/method calls - variables/parameters This way the raw ID will simply get whatever the intended scope was, instead of a unique scope that might be inappropriately themed for its purpose. Will wait a bit for feedback, in case there are other places you might use raw IDs. Co-authored-by: Dusty Pomerleau <[email protected]>
| * | | fix: underscores, raw IDsDusty Pomerleau2020-10-241-16/+17
|/ / / | | | | | | | | | | | | | | | - remove comment scope from ignored params - underscores will automatically receive variable/param scope - add raw ID syntax to modules, functions, and variables
| | |
| \ \
*-. \ \ Merge #6251 #6310bors[bot]2020-10-2313-32/+469
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6251: Semantic Highlight: Add Callable modifier for variables r=matklad a=GrayJack This PR added the `HighlightModifier::Callable` variant and assigned it to variables and parameters that are fn pointers, closures and implements FnOnce trait. This allows to colorize these variables/parameters when used in call expression. 6310: Rewrite algo::diff to support insertion and deletion r=matklad a=Veykril This in turn also makes `algo::diff` generate finer diffs(maybe even minimal diffs?) as insertions and deletions aren't always represented as as replacements of parent nodes now. Required for #6287 to go on. Co-authored-by: GrayJack <[email protected]> Co-authored-by: Lukas Wirth <[email protected]>
| | * | | algo::diff testsLukas Wirth2020-10-222-4/+327
| | | | |
| | * | | Rewrite algo::diff to support insertion and deletionLukas Wirth2020-10-225-25/+68
| | | | |
| * | | | Add tests for callable modifierGrayJack2020-10-212-0/+38
| | | | |
| * | | | Editor: Code: Add callable to package.jsonGrayJack2020-10-161-0/+4
| | | | |
| * | | | Add Callable modifier for variables that implements FnonceGrayJack2020-10-162-3/+24
| | | | |
| * | | | Add HighlightModifier::Callable and add it for localsGrayJack2020-10-164-0/+8
| | | | |
* | | | | Merge #6339bors[bot]2020-10-239-104/+224
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6339: Diagnose #[cfg]s in bodies r=matklad a=jonas-schievink This PR threads diagnostics through body lowering using the `BodySourceMap`, and emits `InactiveCode` diagnostics for expressions, statements, and match arms that are `#[cfg]`d out. Co-authored-by: Jonas Schievink <[email protected]>
| * | | | | Fix name of InactiveCode diagnosticJonas Schievink2020-10-232-7/+7
| | | | | |
| * | | | | Diagnose #[cfg]s in bodiesJonas Schievink2020-10-239-98/+218
| | | | | |