aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src/hover.rs
Commit message (Collapse)AuthorAgeFilesLines
* Move impls of ToNav that use source() to TryToNavNick Spain2021-01-021-5/+5
|
* source_old -> source for cases that can be handled by simple bubblingNick Spain2021-01-021-3/+3
|
* HasSource::source_old -> HasSource::source for places where proc-macros were ↵Nick Spain2021-01-021-8/+1
| | | | | | | | | | | | special cased In #6901 some special case handling for proc-macros was introduced to prevent panicing as they have no AST. Now the new HasSource::source method is used that returns an option. Generally this was a pretty trivial change, the only thing of much interest is that `hir::MacroDef` now implements `TryToNav` not `ToNav` as this allows us to handle `HasSource::source` now returning an option.
* Mark HasSource::source_old as deprecated but allow at all call sitesNick Spain2021-01-021-0/+4
|
* HasSource::source -> HasSource::source_oldNick Spain2021-01-021-4/+4
| | | | To start migrating HasSource::source to return an Option.
* Show lifetimes and labels on hoverLukas Wirth2021-01-011-7/+43
|
* Add ConstParams to the ide layerLukas Wirth2021-01-011-1/+4
|
* Support labels in reference searchLukas Wirth2020-12-241-1/+1
|
* Align code_model name with ungrammarAleksey Kladov2020-12-201-2/+2
|
* Reduce test verbosityAleksey Kladov2020-12-181-403/+109
|
* NavTarget doesn't assume that it points to a symbolAleksey Kladov2020-12-181-37/+111
|
* Don't expose SyntaxKind from IDE APIAleksey Kladov2020-12-181-37/+37
| | | | | | SyntaxKind is somewhat of an internal type, but IDE is using it to basically specify an icon. Let's have a dedicated entity for this instead.
* Merge #6901bors[bot]2020-12-181-0/+6
|\ | | | | | | | | | | | | | | | | | | 6901: Temp fixes panic caused by no ast for proc-macro r=maklad a=edwin0cheng There are some panic when hover/goto definition for proc-macro. It is because in current design, we don't have `ast-node` for proc-macro and then it trigger [this](https://github.com/rust-analyzer/rust-analyzer/blob/479d1f7eec22c3564867223e2093f14774092528/crates/hir/src/has_source.rs#L116) line to panic. This PR is a temp fix for all of these similar to https://github.com/rust-analyzer/rust-analyzer/blob/bd4c352831662762ee7a66da77ec9adf623b0a0a/crates/completion/src/render/macro_.rs#L42 Co-authored-by: Edwin Cheng <[email protected]>
| * Temp fixes panic caused by no ast for proc-macroEdwin Cheng2020-12-181-0/+6
| |
* | Rename ImplDef -> ImplAleksey Kladov2020-12-171-1/+1
| | | | | | | | | | | | We used to have `Def` suffix for all symbols, but we moved off from that. `FunctionDef` isn't better than `Function`. Looks like we've forgot to change `Impl` though!
* | Lifetime reference searchLukas Wirth2020-12-161-1/+1
|/
* Don't highlight parent nodes of comments on hoverLukas Wirth2020-12-111-0/+16
|
* Test inner and outer doc comments in hoverLukas Wirth2020-12-091-0/+62
|
* Remove hir_def/docs.rs moduleLukas Wirth2020-12-071-28/+36
|
* Don't insert blank lines between doc attributesLukas Wirth2020-12-071-2/+0
|
* Show type of Self on hoverLukas Wirth2020-11-291-45/+74
|
* Show type of self param on hoverLukas Wirth2020-11-281-3/+43
|
*-. Merge #6331 #6342bors[bot]2020-10-241-2/+29
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-241-2/+2
| |/ |/|
| * correct hover for items with doc attribute with raw stringsJosh Mcguigan2020-10-241-0/+27
| |
* | Emit better #[cfg] diagnosticsJonas Schievink2020-10-221-2/+2
|/
* Rename declaration_name -> display_nameAleksey Kladov2020-10-201-1/+1
| | | | | | | | Declaration names sounds like a name of declaration -- something you can use for analysis. It empathically isn't, and is just a label displayed in various UI. It's important not to confuse the two, least we accidentally mix semantics with UI (I believe, there's already a case of this in the FamousDefs at least).
* Clarify the names one more timeAleksey Kladov2020-10-151-2/+2
|
* More idiomatic classification APIAleksey Kladov2020-10-151-3/+3
|
* Clarify NameClass names a bitAleksey Kladov2020-10-151-1/+1
|
* Fix hover over field pattern shorthandVlad Shcherbina2020-10-141-1/+24
| | | | | | | Instead of the information about the field, it now shows the information about the local. Fixes #6146
* Remove methodowner & fix formattingZac Pullar-Strecker2020-10-081-1/+1
|
* Rename ide::link_rewrite -> ide::doc_links & tidy importsZac Pullar-Strecker2020-10-081-1/+1
|
* Merge #6140bors[bot]2020-10-061-6/+45
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6140: honour hover.content_format client capability r=lnicola a=robinvd This removes all markdown when the client does not support the markdown MarkupKind. Otherwise the output on the editor will have some markdown boilerplate, making it less readable. For example kak_lsp does not currently support markdown. ![image](https://user-images.githubusercontent.com/22073483/95112949-ef0ff080-0741-11eb-82a7-0594fa2cd736.png) after: ![image](https://user-images.githubusercontent.com/22073483/95113089-2bdbe780-0742-11eb-94fa-bcfec6d7347a.png) Co-authored-by: Robin van Dijk <[email protected]>
| * honor content_format clientcapRobin van Dijk2020-10-051-6/+45
| | | | | | | | | | | | This removes all markdown when the client does not support the markdown MarkupKind Otherwise the output on the editor will have some markdown boilerplate, making it less readable
* | Properly name the fieldKirill Bulatov2020-10-021-1/+1
| |
* | Add a dash testKirill Bulatov2020-10-021-0/+30
|/
* rename mock_analysis -> fixtureAleksey Kladov2020-10-021-8/+8
|
* Get rid of MockAnalysisAleksey Kladov2020-10-021-46/+46
|
* Add hover config `linksInHover` to suppress linksflw2020-09-291-9/+104
|
* Fix type walking about type of async blockoxalica2020-09-111-0/+64
|
* Tease apart orthogonal concerns in markdown link rewritingAleksey Kladov2020-08-261-0/+54
| | | | | | | | | | | | `hir` should know nothing about URLs, markdown and html. It should only be able to: * resolve stringy path from documentation * generate canonical stringy path for a def In contrast, link rewriting should not care about semantics of paths and names resolution, and should be concern only with text mangling bits.
* Cleanup hover links testsAleksey Kladov2020-08-261-88/+74
|
* Merge remote-tracking branch 'upstream/master' into 503-hover-doc-linksZac Pullar-Strecker2020-08-241-55/+542
|
* Switch to expect_test from crates.ioAleksey Kladov2020-08-211-1/+1
|
* display correctly 'impl Trait<T> + Trait<T>' #4814Benjamin Coenen2020-08-131-0/+19
| | | | Signed-off-by: Benjamin Coenen <[email protected]>
* Rename ra_ide -> ideAleksey Kladov2020-08-131-0/+2461