aboutsummaryrefslogtreecommitdiff
path: root/crates/ide
Commit message (Collapse)AuthorAgeFilesLines
* 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
| | |
| * | Add highlighting of items from other cratesAramis Razzaghipour2021-05-243-12/+84
| | |
* | | Bump misc depsLaurențiu Nicola2021-05-241-3/+3
| |/ |/|
* | Correctly resolve crate name in use paths when import shadows itselfLukas Tobias Wirth2021-05-231-0/+20
| |
* | Minor: fix comment styleAleksey Kladov2021-05-231-1/+3
|/ | | | See https://github.com/rust-analyzer/rust-analyzer/blob/master/docs/dev/style.md#documentation
* Give ‘unsafe’ semantic token modifier to unsafe traitsAramis Razzaghipour2021-05-234-3/+16
|
* Add more docsAleksey Kladov2021-05-222-3/+5
|
* Add a "Debug ItemTree" LSP requestJonas Schievink2021-05-212-0/+21
|
* Fix prepare_rename failing for modulesLukas Tobias Wirth2021-05-191-5/+7
|
* Add pub mod option for UnlinkedFilerainy-me2021-05-1812-121/+158
|