aboutsummaryrefslogtreecommitdiff
path: root/crates/ide
Commit message (Collapse)AuthorAgeFilesLines
...
* | Prefer attr macros in "expand macro recursively"Jonas Schievink2021-06-081-20/+14
|/
* Merge #9169bors[bot]2021-06-072-7/+57
|\ | | | | | | | | | | | | | | | | | | 9169: internal: steps towards attribute macro token mapping r=jonas-schievink a=jonas-schievink This doesn't work yet, but we seem to be getting a bit further along (for example, we now stop highlighting `use` items inside item with attribute macros as if they were written verbatim). bors r+ Co-authored-by: Jonas Schievink <[email protected]>
| * Attempt to track attr macros during highlightingJonas Schievink2021-06-071-0/+30
| |
| * Make "expand macro" command work with attribute macrosJonas Schievink2021-06-071-7/+27
| |
* | feat: goto def on impl items also goes to the defn in the traitJade2021-06-071-18/+56
| | | | | | | | | | It was trivial to extend this to associated consts/associated types and I just didn't think of it.
* | feat: goto definition on an impl fn goes to that fn in the traitJade2021-06-071-3/+48
|/ | | | | | | e.g. if you have a trait T and `impl T for S` for some struct, if you goto definition on some function name inside the impl, it will go to the definition of that function inside the `trait T` block, rather than the current behaviour of not going anywhere at all.
* Merge #9149bors[bot]2021-06-051-3/+49
|\ | | | | | | | | | | | | | | | | | | 9149: feat: Support goto-definition for include macros input path r=Veykril a=Veykril ![0l6l9iWPNE](https://user-images.githubusercontent.com/3757771/120891155-3fa85800-c607-11eb-9b20-7ac330dceb4b.gif) Fixes #5871 Co-authored-by: Lukas Wirth <[email protected]>
| * Support goto-definition for include macro pathsLukas Wirth2021-06-051-3/+49
| |
* | Prevent renaming of aliases on usagesLukas Wirth2021-06-051-1/+32
|/
* Merge #9138bors[bot]2021-06-041-12/+133
|\ | | | | | | | | | | | | | | | | | | | | | | | | 9138: feat: Implement hover for lints r=Veykril a=Veykril fixes https://github.com/rust-analyzer/rust-analyzer/issues/8857, fixes https://github.com/rust-analyzer/rust-analyzer/issues/3941 ![URXBanNxYe](https://user-images.githubusercontent.com/3757771/120830905-4bd8da80-c55f-11eb-9f55-ff5a321726fa.gif) We also generate the default lints(and lint groups 🎉) instead now by invoking `rustc -W help` and parsing the output from that. Co-authored-by: Lukas Wirth <[email protected]>
| * Replace `-` with `_` in generated lint namesLukas Wirth2021-06-041-6/+4
| |
| * Generate default lint completionsLukas Wirth2021-06-041-15/+60
| |
| * Implement hover for lintsLukas Wirth2021-06-041-6/+84
| |
* | Add function references hover actionLukas Wirth2021-06-041-1/+28
|/
* Cleanup parameter_hint_heuristics inlay hints testLukas Wirth2021-06-041-87/+68
|
* Reorganize inlay_hints testsLukas Wirth2021-06-041-522/+493
|
* Merge #9130bors[bot]2021-06-031-70/+57
|\ | | | | | | | | | | | | | | | | | | | | 9130: Prefix/suffix parameter inlay hint hiding heuristic is more strict r=Veykril a=Veykril Instead of just plainly checking prefix/suffix of the argument string to the parameter name we only check for prefixes and suffixes if they are split apart via an underscore meaning, with the argument `foo`, it will be hidden for the parameter name `foo_bar` but not for `foobar`. bors r+ Closes https://github.com/rust-analyzer/rust-analyzer/issues/8878 Co-authored-by: Lukas Wirth <[email protected]>
| * Prefix/suffix parameter inlay hint hiding heuristic is more strictLukas Wirth2021-06-031-70/+57
| |
* | Allow expand-macro to be invoked anywhere inside a macro callLukas Wirth2021-06-021-3/+3
|/
* Merge #8952bors[bot]2021-05-311-1/+71
|\ | | | | | | | | | | | | | | 8952: add support of impl block for doctest into runnables r=matklad a=bnjjj close #6356 Co-authored-by: Benjamin Coenen <[email protected]>
| * add support of impl block for doctest into runnablesBenjamin Coenen2021-05-241-1/+71
| | | | | | | | Signed-off-by: Benjamin Coenen <[email protected]>
* | Merge #8866bors[bot]2021-05-311-58/+70
|\ \ | | | | | | | | | | | | | | | | | | | | | 8866: Update salsa r=matklad a=jonas-schievink This updates salsa to include https://github.com/salsa-rs/salsa/pull/265, and removes all cancellation-related code from rust-analyzer Co-authored-by: Jonas Schievink <[email protected]>
| * | Update salsaJonas Schievink2021-05-271-58/+70
| | |
* | | Diagnose unimplemented built-in macrosJonas Schievink2021-05-301-0/+5
| | |
* | | simplifyLukas Wirth2021-05-281-13/+4
| | |
* | | Merge #9038bors[bot]2021-05-281-0/+17
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 9038: Folding range for return types r=Veykril a=MozarellaMan For issue #8957 ![return type fold](https://user-images.githubusercontent.com/48062697/119979082-5c62e100-bfb2-11eb-9729-1dea1ce74de1.gif) Co-authored-by: Ayomide Bamidele <[email protected]>
| * | | Test for correct amount of emitted foldsAyomide Bamidele2021-05-281-0/+2
| | | |
| * | | Folding range for return typesAyomide Bamidele2021-05-281-0/+15
| |/ /
* / / Move runnable lenses below attributesLukas Wirth2021-05-281-17/+17
|/ /
* | Merge #8997bors[bot]2021-05-271-0/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8997: internal: stop expanding UseTrees during ItemTree lowering r=jonas-schievink a=jonas-schievink Closes https://github.com/rust-analyzer/rust-analyzer/issues/8908 Messy diff, but `ItemTree` lowering got simpler, since we now have a strict 1-to-1 mapping between `ast::Item` and `ModItem`. The most messy part is mapping a single `UseTree` back to its `ast::UseTree` counterpart for diagnostics, but I think the ad-hoc source map built during lowering does the job. Co-authored-by: Jonas Schievink <[email protected]>
| * | Stop expanding UseTrees during ItemTree loweringJonas Schievink2021-05-261-0/+2
| | |
* | | Document semantic token tagsLukas Wirth2021-05-261-4/+74
| | |
* | | Merge #9003bors[bot]2021-05-262-0/+26
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 9003: minor: Document semantic token modifiers r=Veykril a=Veykril Part of #6457 Co-authored-by: Lukas Wirth <[email protected]>
| * | | Document semantic token modifiersLukas Wirth2021-05-262-0/+26
| | | |
* | | | Merge #9002bors[bot]2021-05-261-35/+31
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 9002: Move annotations below item attributes r=Veykril a=Veykril This moves annotations/code lenses below attributes in items, bringing them inline with functions where this is already the case. This is done by changing the annotations covering range to just the name node's range which is also more inline with what the lsp expects which is that the range should ideally only cover a single line. Fixes https://github.com/rust-analyzer/rust-analyzer/issues/9000 bors r+ Co-authored-by: Lukas Wirth <[email protected]>
| * | | | Move annotations below item attributesLukas Wirth2021-05-261-35/+31
| |/ / /
* | | | Merge #8996bors[bot]2021-05-263-8/+25
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | 8996: Fix bug where library functions were not highlighted as such r=arzg a=arzg Sorry about forgetting to test this in my last PR. Co-authored-by: Aramis Razzaghipour <[email protected]>
| * | | Fix bug where library functions were not highlighted as suchAramis Razzaghipour2021-05-263-8/+25
| | | |
* | | | Merge #8973bors[bot]2021-05-251-20/+45
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | 8973: internal: move diagnostics to hir r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * | | internal: move diagnostics to hirAleksey Kladov2021-05-251-20/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The idea here is to eventually get rid of `dyn Diagnostic` and `DiagnosticSink` infrastructure altogether, and just have a `enum hir::Diagnostic` instead. The problem with `dyn Diagnostic` is that it is defined in the lowest level of the stack (hir_expand), but is used by the highest level (ide). As a first step, we free hir_expand and hir_def from `dyn Diagnostic` and kick the can up to `hir_ty`, as an intermediate state. The plan is then to move DiagnosticSink similarly to the hir crate, and, as final third step, remove its usage from the ide. One currently unsolved problem is testing. You can notice that the test which checks precise diagnostic ranges, unresolved_import_in_use_tree, was moved to the ide layer. Logically, only IDE should have the infra to render a specific range. At the same time, the range is determined with the data produced in hir_def and hir crates, so this layering is rather unfortunate. Working on hir_def shouldn't require compiling `ide` for testing.
* | | | Also do goto implementation on assoc constsJade2021-05-251-2/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I forgot to put this into #8988, sorry. Goto implementation on a const on the trait will go to the implementations with their respective definitions of the const, if present.
* | | | feat: go to implementation on trait functionsJade2021-05-251-1/+45
|/ / / | | | | | | | | | | | | | | | | | | Fix #8537. GIF: https://user-images.githubusercontent.com/6652840/119501981-45a45c00-bd1e-11eb-8336-9145f2888643.gif
* / / Add go to type definition for struct fields within structJade2021-05-251-0/+32
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Example: ```rust struct A; struct B { a/*<- cursor*/: A, } ``` Go to type definition used to not work on this position. It now goes to `A` as expected.
* | Merge #8942bors[bot]2021-05-257-30/+121
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8942: Add `library` semantic token modifier to items from other crates r=arzg a=arzg Closes #5772. A lot of code here is pretty repetitive; please let me know if you have any ideas how to improve it, or whether it’s fine as-is. Side-note: How can I add tests for this? I don’t see a way for the test Rust code in `test_highlighting` to reference other crates to observe the new behaviour. Co-authored-by: Aramis Razzaghipour <[email protected]>
| * | Refactor application of `library` semantic token modifierAramis Razzaghipour2021-05-251-62/+15
| | |
| * | Remove superfluous early-returnsAramis Razzaghipour2021-05-241-18/+22
| | |
| * | Rename ‘foreign’ semantic token modifier to ‘library’Aramis Razzaghipour2021-05-243-18/+18
| | |
| * | Add testing of foreign item highlightingAramis Razzaghipour2021-05-242-1/+55
| | |
| * | Highlight foreign modules as suchAramis Razzaghipour2021-05-241-1/+9
| | |
| * | Remove hir krate methodsAramis Razzaghipour2021-05-243-11/+11
| | |