Aleksey Kladov
81e91980dd
simplify
2019-04-13 01:05:18 +03:00
Aleksey Kladov
7c13e22334
simplify tests
2019-04-13 00:56:57 +03:00
Aleksey Kladov
0fd93bc14a
use really correct resolver for expressions
2019-04-13 00:44:47 +03:00
bors[bot]
34a05b7fea
Merge #1140
...
1140: ⬆️ vfs r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-04-12 20:35:38 +00:00
Aleksey Kladov
0b3d407e98
⬆️ vfs
2019-04-12 23:35:12 +03:00
Edwin Cheng
f66300ccd1
Remove skip Delimiter::None and handle Dollars
2019-04-13 01:50:05 +08:00
Aleksey Kladov
20013de2ab
fix typo
2019-04-11 17:15:20 +03:00
Aleksey Kladov
cf2ba2791d
add todo
2019-04-11 17:14:41 +03:00
Aleksey Kladov
a347208bb2
use correct resolver for expressions
2019-04-11 16:51:30 +03:00
Aleksey Kladov
ebb0c377f0
remove resolver from CompletonContext
2019-04-11 16:49:35 +03:00
Aleksey Kladov
3c9f2d0e37
simplify
2019-04-11 16:39:56 +03:00
Aleksey Kladov
5471c1ef4b
generalize SourceAnalyzer to handle all defs with bodies
2019-04-11 16:37:29 +03:00
Aleksey Kladov
07cc047b4f
minimize the API
2019-04-11 16:29:33 +03:00
Aleksey Kladov
b6809b6695
rename
2019-04-11 16:29:33 +03:00
Aleksey Kladov
6c2ba945ed
reduce visibility
2019-04-11 16:29:33 +03:00
Aleksey Kladov
505acc973b
Make call info to use real name resolution
2019-04-11 16:29:33 +03:00
Aleksey Kladov
10d66d63d7
introduce SourceAnalyzer
2019-04-11 16:29:33 +03:00
bors[bot]
e6e2571bdf
Merge #1133
...
1133: fix typo r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-04-11 08:13:53 +00:00
Aleksey Kladov
6a8b3c1d4b
fix typo
2019-04-11 11:13:31 +03:00
Edwin Cheng
74e846b9ec
Add L_DOLLAR and R_DOLLAR
2019-04-11 11:02:41 +08:00
bors[bot]
6d9acb8753
Merge #1131
...
1131: Use inline snapshots in complete_dot r=matklad a=vipentti
Relates to #1127
Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>
2019-04-10 11:05:31 +00:00
bors[bot]
b28e403c6c
Merge #1130
...
1130: Use inline snapshots in complete_fn_param r=matklad a=vipentti
Relates to #1127
Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>
2019-04-10 10:58:21 +00:00
Ville Penttinen
57283b4e5f
Use inline snapshots in complete_dot
2019-04-10 13:47:20 +03:00
Ville Penttinen
1b19c1c8f2
Use inline snapshots in complete_fn_param
2019-04-10 13:22:50 +03:00
bors[bot]
37eb12f2dd
Merge #1128
...
1128: A touch of type-safety r=matklad a=matklad
Note that we intentionally don't use `Either` from crates.io: I like A/B naming more then left/rigth, I feel like we might need Either3 with C at some point, and I'd love the ability to write inherent impls
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-04-10 07:50:57 +00:00
Aleksey Kladov
10726fdb65
type-safer source-map for bindings
2019-04-10 10:48:15 +03:00
Aleksey Kladov
1cd184d653
use either for uses
2019-04-10 10:12:54 +03:00
bors[bot]
b863272899
Merge #1126
...
1126: Swithc to native salsa interning r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-04-09 20:04:42 +00:00
Aleksey Kladov
88189c4282
drop old interning infra
2019-04-09 22:52:06 +03:00
Aleksey Kladov
6b993a9760
migrate to salsas interning
2019-04-09 22:51:22 +03:00
bors[bot]
cc284dad30
Merge #1122
...
1122: Add explicit type assist. r=matklad a=marcogroppo
This assist can be used to specify the explicit type in let statements. For example `let num = 1;` becomes `let num: i32 = 1;`.
The assist is applicable only if the inferred type is fully known.
Co-authored-by: Marco Groppo <marco.groppo@gmail.com>
2019-04-09 19:16:28 +00:00
Marco Groppo
c5f8f3b1f4
Stylistic changes. Updated features.md with the new assists.
2019-04-09 21:12:54 +02:00
bors[bot]
2fc2d4373b
Merge #1110
...
1110: Introduce display module and implement new FunctionSignature for CallInfo's r=matklad a=vipentti
This introduces a new module `display` in `ra_ide_api` that contains UI-related things, in addition this refactors CallInfo's function signatures into a new `FunctionSignature` type, which implements `Display` and can be converted into `lsp_types::SignatureInformation` in the `conv` layer.
Currently only `CallInfo` uses the `FunctionSignature` directly, but `function_label` now uses the same signature and returns it as a string, using the `Display` implementation.
This also fixes #960
I think this similar structure could be applied to other UI-displayable items, so instead of the `ra_ide_api` returning `Strings` we could return some intermediate structures that can be converted into a UI-displayable `String` easily, but that could also provide some additional information.
Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>
2019-04-09 17:55:44 +00:00
Ville Penttinen
45a2b92524
Fix doc comment
2019-04-09 16:08:24 +03:00
Ville Penttinen
07f0069f34
Move display related things from hover to display
2019-04-09 14:45:05 +03:00
Ville Penttinen
fead60aa27
Move FunctionSignature to display/function_signature
2019-04-09 14:45:05 +03:00
Ville Penttinen
bd6ddfcdde
Make display modules private
2019-04-09 14:45:05 +03:00
Ville Penttinen
7821c56be7
Move structure to display/structure
2019-04-09 14:45:05 +03:00
Ville Penttinen
027d4d229d
Move navigation_target to display/navigation_target
2019-04-09 14:45:05 +03:00
Ville Penttinen
946b5789d1
Move completion label functions to display
2019-04-09 14:45:05 +03:00
Ville Penttinen
dfaebd76ab
Add FunctionSignature::from_hir
2019-04-09 14:45:05 +03:00
Ville Penttinen
2fe075f56e
Normalize line-endings in display.rs
...
This changes from CRLF to LF
2019-04-09 14:45:05 +03:00
Ville Penttinen
f4aa15c16b
Move FunctionSignature creation to display
2019-04-09 14:45:05 +03:00
Ville Penttinen
ed65e2619a
Add no parameter test to call_info
2019-04-09 14:45:05 +03:00
Ville Penttinen
7ba22f1c19
Move FunctionSignature to display, remove write_joined
...
write_joined is replaced with `join_to_string::join` which provides the
necessary functionality.
2019-04-09 14:45:05 +03:00
Ville Penttinen
84fde47d00
Move test specific things
2019-04-09 14:45:04 +03:00
Ville Penttinen
751b454442
Update test snapshots
2019-04-09 14:45:04 +03:00
Ville Penttinen
0e49abb7fb
Refactor CallInfo function signatures to new FunctionSignature type
...
This is used by CallInfo to create a pretty printed function signature that can
be used with completions and other places as well.
2019-04-09 14:45:04 +03:00
bors[bot]
5f700179fc
Merge #1123
...
1123: migrate to untyped rowan r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-04-09 07:29:06 +00:00
Aleksey Kladov
faf526e021
migrate to untyped rowan
2019-04-09 10:26:51 +03:00