bors[bot]
15189bc724
Merge #1021
...
1021: Wasm dependencies r=matklad a=detrumi
As a first step towards running RA on WASM (see #1007 ), this tweaks the dependencies somewhat so that projects built using `wasm-pack` can use `ra_ide_api` as a dependency.
There were two problems:
- use of undeclared type or module `MmapInner`
This error occurred because of the `memmap` crate, as a dependency of `fst`
Solution: specify `default-features = false` for the `fst` package (see https://github.com/BurntSushi/fst/issues/70 )
- use of undeclared type or module `imp`
This happened in the `wait-timeout` crate ([which uses `Command` under the hood](https://github.com/alexcrichton/wait-timeout/issues/18 )), a dependency of `rusty-fork` which is a dependency of `proptest`.
Solution: move `proptest` to dev-dependencies and add `#[cfg(test)]` to the `test_utils` crate.
**Edit:** Oh, that causes trouble with resolving the import when running the tests. Hmm...
Co-authored-by: Wilco Kusee <wilcokusee@gmail.com>
2019-03-22 20:22:37 +00:00
Wilco Kusee
4e6d0933cc
Disable memmap feature in fst dependency
2019-03-22 21:22:03 +01:00
Wilco Kusee
01bca7114c
Simplify changes and fix tests
2019-03-22 17:12:32 +01:00
Wilco Kusee
9bd8336c51
Remove LocalEdit usage
2019-03-22 17:12:32 +01:00
Wilco Kusee
58e77660de
Move join_lines to ra_ide_api
2019-03-22 17:12:31 +01:00
Sergey Parilin
47c501bcfb
Move folding_ranges to ra_ide_api
2019-03-22 16:31:21 +03:00
Sergey Parilin
fda70badf8
line_index and line_index_utils moved to ra_ide_api
2019-03-22 15:24:43 +03:00
Florian Diebold
cbb418ebb8
Rename name field to ctor as well
2019-03-21 22:29:12 +01:00
Florian Diebold
f10f5a81b3
TypeName => TypeCtor
2019-03-21 22:20:03 +01:00
Florian Diebold
8a5fbf4713
Remove the old variants replaced by Ty::Apply
2019-03-21 22:17:00 +01:00
Aleksey Kladov
1b58e3e410
cleanup
2019-03-21 19:21:58 +03:00
Aleksey Kladov
7cae9ddeeb
move diagnostics to ide_api
2019-03-21 19:08:54 +03:00
Aleksey Kladov
b931a472c4
move extend selection from ra_ide_api_light to ra_ide_api
2019-03-20 23:52:55 +03:00
Aleksey Kladov
3eb56f7a6a
introduce Analysis::from_single_file
2019-03-20 23:38:59 +03:00
Aleksey Kladov
6955e392f8
remove old macro support
2019-03-17 12:53:22 +03:00
Aleksey Kladov
b2a6c17362
remove lower module
2019-03-17 12:52:52 +03:00
Aleksey Kladov
2195d1db6d
Replace module_tree with CrateDefMap
2019-03-17 12:49:07 +03:00
Florian Diebold
c5ee60e05b
Replace Display by a pretty printing trait for Ty
...
This allows removing the names from Adt and FnDef (and more later), as a first
step towards aligning more with chalk's Ty :)
2019-03-16 16:36:59 +01:00
Aleksey Kladov
8774067a87
sort navigations to make tests stable
2019-03-14 13:28:45 +03:00
kjeremy
27fc99776f
Remove superfluous semicolons
...
Doesn't change the result of the test but it does prevent the
syntax tree from rendering.
2019-03-08 16:45:26 -05:00
Ville Penttinen
b168104d95
Use ast::Name::text() instead of name().syntax().text()
2019-03-07 20:58:41 +02:00
Ville Penttinen
5c0556c2ca
Fix EnumVariants not showing properly when hovering
...
This fixes documentation as well for EnumVariants
2019-03-07 20:33:33 +02:00
Ville Penttinen
4a0bb3d7c5
Add support for goto definition and hover on Self
...
This fixes #943
2019-03-07 17:34:44 +02:00
kjeremy
064707c5a0
Use source map
2019-03-06 14:40:42 -05:00
kjeremy
aac421b135
Hover for associated items in patterns
2019-03-06 11:39:11 -05:00
kjeremy
eb3ee7b8e5
Updates
2019-03-05 10:26:36 -05:00
Aleksey Kladov
d1c982d3c7
dont produce giant debug dumps
2019-03-05 17:09:48 +03:00
kjeremy
1578375b89
Make ExpOrPatId private
2019-03-04 09:49:18 -05:00
Jeremy Kolb
79f61dcb0e
Format
2019-03-04 08:34:41 -05:00
Jeremy Kolb
e1b59bfe0b
Add NavigationTarget::from_impl_item
2019-03-04 08:27:08 -05:00
Jeremy Kolb
3d8d880c59
Use ImplItems instead of just Function
2019-03-04 08:27:08 -05:00
kjeremy
49da9a3e81
Make goto definition/hover resolve constructors
2019-03-04 08:27:08 -05:00
Ville Penttinen
1ef2c06131
Allow syntax strings to contain test markers
...
We simply remove all the CUSTOM_MARKERS before attempting to parse the file.
This allows for the syntax selection to work with most of the test strings.
2019-03-04 09:19:46 +02:00
Ville Penttinen
16ecd276f0
Implement syntax tree support for syntax inside string
...
This allows us to select a string or portions of it and try parsing it as rust
syntax. This is mostly helpful when developing tests where the test
itself contains some rust syntax as a string.
2019-03-04 09:02:01 +02:00
Ville Penttinen
ac52d9a1f1
Add optional range parameter to SyntaxTreeParams
...
When range is provided, instead of showing the syntax for the whole file, we'll
show the syntax tree for the given range.
2019-03-03 19:49:50 +02:00
Florian Diebold
affaf7700a
Represent unknown types as {unknown} instead of [unknown]
...
Since the latter could actually be a real type...
2019-03-03 03:00:17 +01:00
bors[bot]
00b09bcd8c
Merge #908
...
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 <villem.penttinen@gmail.com>
2019-03-02 14:21:44 +00:00
Aleksey Kladov
8fc08d36e3
remove second way to get the body
2019-03-02 16:59:18 +03:00
Aleksey Kladov
03b2ab8e1f
rename syntax_mapping as well
2019-03-02 16:56:09 +03:00
Aleksey Kladov
80bb7d86ec
align lower module query names
2019-03-02 16:49:06 +03:00
Aleksey Kladov
f4c5383103
dont store body inside source map
2019-03-02 16:18:40 +03:00
Aleksey Kladov
eaf1df26e9
rename syntax-mapping -> source-map
2019-03-02 15:40:40 +03:00
kjeremy
d0efa77e0e
Update hover message since we do support globs
2019-02-28 14:48:21 -05:00
Ville Penttinen
da26820ebd
Enable markup for hover on expressions which resolve using type_of
...
This adds highlighting when hovering over items which are resolved using
`type_of`.
2019-02-28 09:33:06 +02:00
Ville Penttinen
c879f43186
Enable hover support for NamedFieldDefs
...
Additionally add type ascription for const and statics as well.
2019-02-27 17:52:37 +02:00
Ville Penttinen
bb4521be1c
Allow goto-definition to work for named fields in struct initializer
...
Now goto definition should work when done on a named field in a struct
initializer.
2019-02-27 17:51:59 +02:00
Ville Penttinen
e3525527e3
Add support for hovering over the name of an item
2019-02-27 09:49:22 +02:00
Ville Penttinen
79114c67b1
Replace visit_fn with crate::completion::function_label
2019-02-26 21:30:46 +02:00
Ville Penttinen
6f5fd6c9de
Add new type HoverResult to contain the results of hovering
...
This makes testing hovers easier as well as allows us to do more things with the
results if needed.
2019-02-26 19:30:17 +02:00
Ville Penttinen
3ec2584148
Add support for showing fn signature when hovering
2019-02-26 18:55:08 +02:00