aboutsummaryrefslogtreecommitdiff
path: root/crates/ide
Commit message (Collapse)AuthorAgeFilesLines
...
| * | 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
|
* fix: don't add extra whitespace around fieldsAleksey Kladov2021-05-171-0/+25
| | | | closes #8785
* minor: add missing testsAleksey Kladov2021-05-172-0/+52
|
* internal: scalable module structure for fixitsAleksey Kladov2021-05-178-766/+693
|
* minor: extract fix to fileAleksey Kladov2021-05-172-44/+196
|
* Merge #8853bors[bot]2021-05-162-4/+4
|\ | | | | | | | | | | | | | | | | 8853: Tag Self in impls as a TypeAlias r=matklad a=Veykril bors r+ Fixes #4398 Co-authored-by: Lukas Wirth <[email protected]>
| * Tag Self in impls as a TypeAliasLukas Wirth2021-05-162-4/+4
| |
* | internal: use mutable syntax trees when filling fieldsAleksey Kladov2021-05-162-6/+7
| |
* | Merge #8813bors[bot]2021-05-162-2/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8813: Get some more array lengths! r=lf- a=lf- This is built on #8799 and thus contains its changes. I'll rebase it onto master when that one gets merged. It adds support for r-a understanding the length of: * `let a: [u8; 2] = ...` * `let a = b"aaa"` * `let a = [0u8; 4]` I have added support for getting the values of byte strings, which was not previously there. I am least confident in the correctness of this part and it probably needs some more tests, as we currently have only one test that exercised that part (!). Fixes #2922. Co-authored-by: Jade <[email protected]>
| * | Support length for ByteStringsJade2021-05-132-2/+2
| | | | | | | | | | | | I am not confident that my added byte string parsing is right.
* | | Attach comments to ast::ImplLukas Wirth2021-05-152-1/+25
| | |
* | | simplifyLukas Wirth2021-05-152-10/+8
| |/ |/|
* | Address commentshi-rustin2021-05-143-3/+25
| |
* | Apply async semantic token modifier to async/await keywordshi-rustin2021-05-142-0/+11
| | | | | | | | Only async semantic token modifier