aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/hover.rs
Commit message (Collapse)AuthorAgeFilesLines
* fix typos in mbe testsAleksey Kladov2019-05-281-2/+2
|
* Fix hover on the beginning of a nested expressionFlorian Diebold2019-04-281-7/+14
| | | | | | | | | | | | | | | | E.g. in ``` let foo = 1u32; if true { <|>foo; } ``` the hover shows `()`, the type of the whole if expression, instead of the more sensible `u32`. The reason for this was that the search for an expression was slightly left-biased: When on the edge between two tokens, it first looked at all ancestors of the left token and then of the right token. Instead merge the ancestors in ascending order, so that we get the smaller of the two possible expressions.
* use really correct resolver for expressionsAleksey Kladov2019-04-121-1/+1
|
* renameAleksey Kladov2019-04-111-1/+1
|
* introduce SourceAnalyzerAleksey Kladov2019-04-111-10/+8
|
* Move display related things from hover to displayVille Penttinen2019-04-091-107/+3
|
* Move completion label functions to displayVille Penttinen2019-04-091-1/+1
|
* switch to new rowanAleksey Kladov2019-04-011-6/+8
|
* replace todo with fixmeAleksey Kladov2019-03-231-1/+1
|
* Remove the old variants replaced by Ty::ApplyFlorian Diebold2019-03-211-16/+1
|
* Replace Display by a pretty printing trait for TyFlorian Diebold2019-03-161-2/+3
| | | | | This allows removing the names from Adt and FnDef (and more later), as a first step towards aligning more with chalk's Ty :)
* Remove superfluous semicolonskjeremy2019-03-081-5/+5
| | | | | Doesn't change the result of the test but it does prevent the syntax tree from rendering.
* Use ast::Name::text() instead of name().syntax().text()Ville Penttinen2019-03-071-2/+2
|
* Fix EnumVariants not showing properly when hoveringVille Penttinen2019-03-071-2/+56
| | | | This fixes documentation as well for EnumVariants
* Add support for goto definition and hover on SelfVille Penttinen2019-03-071-0/+58
| | | | This fixes #943
* Hover for associated items in patternskjeremy2019-03-061-0/+23
|
* Use ImplItems instead of just FunctionJeremy Kolb2019-03-041-1/+1
|
* Make goto definition/hover resolve constructorskjeremy2019-03-041-0/+22
|
* Represent unknown types as {unknown} instead of [unknown]Florian Diebold2019-03-031-1/+1
| | | | Since the latter could actually be a real type...
* Merge #908bors[bot]2019-03-021-8/+27
|\ | | | | | | | | | | | | | | | | | | | | 908: Enable markup for hover on expressions which resolve using type_of r=matklad a=vipentti This adds highlighting when hovering over items which are resolved using `type_of`. This adds basic highlighting, discussed in #904. Co-authored-by: Ville Penttinen <[email protected]>
| * Enable markup for hover on expressions which resolve using type_ofVille Penttinen2019-02-281-8/+27
| | | | | | | | | | This adds highlighting when hovering over items which are resolved using `type_of`.
* | rename syntax_mapping as wellAleksey Kladov2019-03-021-3/+3
| |
* | rename syntax-mapping -> source-mapAleksey Kladov2019-03-021-1/+1
| |
* | Update hover message since we do support globskjeremy2019-02-281-1/+1
|/
* Enable hover support for NamedFieldDefsVille Penttinen2019-02-271-3/+79
| | | | Additionally add type ascription for const and statics as well.
* Add support for hovering over the name of an itemVille Penttinen2019-02-271-1/+27
|
* Replace visit_fn with crate::completion::function_labelVille Penttinen2019-02-261-43/+2
|
* Add new type HoverResult to contain the results of hoveringVille Penttinen2019-02-261-14/+146
| | | | | This makes testing hovers easier as well as allows us to do more things with the results if needed.
* Add support for showing fn signature when hoveringVille Penttinen2019-02-261-3/+43
|
* rename type to type_alias in the AST as wellAleksey Kladov2019-02-251-2/+2
|
* Merge #866bors[bot]2019-02-221-0/+20
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | 866: Implement basic support for Associated Methods r=flodiebold a=vipentti This is my attempt at learning to understand how the type inference works by adding basic support for associated methods. Currently it does not resolve associated types or constants. The basic idea is that `Resolver::resolve_path` returns a new `PathResult` type, which has two variants, `FullyResolved` and `PartiallyResolved`, fully resolved matches the previous behavior, where as `PartiallyResolved` contains the `PerNs<Resolution` in addition to a `segment_index` which contains the index of the segment which we failed to resolve. This index can then be used to continue inference in `infer_path_expr` using the `Type` we managed to resolve. This changes some of the previous apis, so looking for feedback and suggestions. This should enable fixing #832 Co-authored-by: Ville Penttinen <[email protected]>
| * Implement basic support for Associated Methods and ConstantsVille Penttinen2019-02-211-0/+20
| | | | | | | | | | | | | | This is done in `infer_path_expr`. When `Resolver::resolve_path` returns `PartiallyResolved`, we use the returned `Resolution` together with the given `segment_index` to check if we can find something matching the segment at segment_index in the impls for that particular type.
* | Fix handling of generics in tuple variants and refactor a bitFlorian Diebold2019-02-201-0/+17
|/ | | | | | Also make them display a tiny bit nicer. Fixes #860.
* Fix some typosPascal Hertleif2019-02-121-2/+2
|
* reformat the worldAleksey Kladov2019-02-081-10/+4
|
* Make doc comments optionalJeremy Kolb2019-01-261-6/+1
|
* rename source_file -> parseAleksey Kladov2019-01-261-3/+3
|
* rename FilesDatabase -> SourceDatabaseAleksey Kladov2019-01-261-1/+1
|
* fold syntax database into files databaseAleksey Kladov2019-01-261-1/+1
|
* move rename to a new modgfreezy2019-01-191-2/+1
|
* remove Canceled from API implAleksey Kladov2019-01-151-29/+19
|
* remove Cancelable from type inferenceAleksey Kladov2019-01-151-1/+1
|
* remove Cancelable from funciton bodyAleksey Kladov2019-01-151-1/+1
|
* remove Cancelable from source bindersAleksey Kladov2019-01-151-1/+1
|
* Fix type inference for raw (byte) stringsMarcus Klaas de Vries2019-01-141-3/+2
|
* Remove duplicationJeremy Kolb2019-01-141-74/+23
|
* Add visibility to hoverJeremy Kolb2019-01-141-9/+41
|
* Tweak message shown for query fallbackPascal Hertleif2019-01-131-1/+5
| | | | Small tweak for #518
* Add an explanatory message when we use the Query fallbackDJMcNab2019-01-131-4/+11
|
* rename TreePtr -> TreeArcAleksey Kladov2019-01-111-2/+2
| | | | This is much clearer about the semantics