Aleksey Kladov
10d66d63d7
introduce SourceAnalyzer
2019-04-11 16:29:33 +03: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
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
Aleksey Kladov
10726fdb65
type-safer source-map for bindings
2019-04-10 10:48:15 +03:00
Aleksey Kladov
6b993a9760
migrate to salsas interning
2019-04-09 22:51:22 +03: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
robojumper
2caa690ef6
Rudimentarily autocomplete tuple struct field access
2019-04-06 01:10:48 +02:00
Aleksey Kladov
0de89f786f
always produce source for import
2019-04-02 17:58:04 +03:00
Aleksey Kladov
7d6bd5d137
always show token text
2019-04-02 14:49:46 +03:00
Aleksey Kladov
49f13d3a9b
fix a panic with glob-import missing a source map
2019-04-02 13:26:09 +03:00
Aleksey Kladov
5287a2506c
More future-proof comment kind
2019-04-02 12:18:52 +03:00
Aleksey Kladov
3f3ff2f0f4
fix comment naming
2019-04-02 10:48:59 +03:00
Aleksey Kladov
ae282d8da6
add ast::tokens
2019-04-02 10:23:29 +03:00
bors[bot]
b7e26c32a1
Merge #1067
...
1067: Take number of arguments at the call-site into account for signature help r=matklad a=kjeremy
Fixes #1065
Co-authored-by: kjeremy <kjeremy@gmail.com>
2019-04-01 11:15:34 +00:00
Aleksey Kladov
9e213385c9
switch to new rowan
2019-04-01 12:06:24 +03:00
kjeremy
80113876e2
Simplify
2019-03-27 11:02:06 -04:00
kjeremy
7b34c4c002
Take number of arguments at the call-site into account for signature help
...
Fixes #1065
2019-03-27 10:00:51 -04:00
bors[bot]
a82755e241
Merge #1059
...
1059: Typed ids r=matklad a=matklad
just some type-safety and refactorings.
closes https://github.com/rust-analyzer/rust-analyzer/issues/1054
bors r+
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-03-26 16:16:54 +00:00
Aleksey Kladov
e28db444df
rename
2019-03-26 19:11:01 +03:00
Wilco Kusee
e03189c110
Move ra_ide_api unit tests
2019-03-25 21:03:32 +01:00
bors[bot]
c4ead49361
Merge #1034
...
1034: HIR diagnostics API r=matklad a=matklad
This PR introduces diagnostics API for HIR, so we can now start issuing errors and warnings! Here are requirements that this solution aims to fulfill:
* structured diagnostics: rather than immediately rendering error to string, we provide a well-typed blob of data with error-description. These data is used by IDE to provide fixes
* open set diagnostics: there's no single enum with all possible diagnostics, which hopefully should result in better modularity
The `Diagnostic` trait describes "a diagnostic", which can be downcast to a specific diagnostic kind. Diagnostics are expressed in terms of macro-expanded syntax tree: they store pointers to syntax nodes. Diagnostics are self-contained: you don't need any context, besides `db`, to fully understand the meaning of a diagnostic.
Because diagnostics are tied to the source, we can't store them in salsa. So subsystems like type-checking produce subsystem-local diagnostic (which is a closed `enum`), which is expressed in therms of subsystem IR. A separate step converts these proto-diagnostics into `Diagnostic`, by merging them with source-maps.
Note that this PR stresses type-system quite a bit: we now type-check every function in open files to compute errors!
Discussion on Zulip: https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Fwg-rls-2.2E0/topic/Diagnostics.20API
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-03-25 11:38:46 +00:00
Aleksey Kladov
309716cffe
move tests to where they belong
2019-03-25 14:29:24 +03:00
Sergey Parilin
36cb58f76d
structure moved to ra_ide_api
...
ra_ide_api_light removed completely
2019-03-25 11:41:21 +03:00
Aleksey Kladov
e9af69d9db
simplify
2019-03-25 10:56:55 +03:00
Aleksey Kladov
5ce84f3cbc
tweak diagnostics API
2019-03-25 10:52:50 +03:00
Aleksey Kladov
c7ffd939f6
more enterprisey diagnostics setup
2019-03-25 10:52:50 +03:00
Aleksey Kladov
7ee2887d1e
fixes
2019-03-25 10:52:50 +03:00
Aleksey Kladov
45fbab2b1a
check impls as well
2019-03-25 10:52:50 +03:00
Aleksey Kladov
79df62bc74
cleanup
2019-03-25 10:52:50 +03:00
Aleksey Kladov
3fb88e95aa
switch modules to new diagnostics
2019-03-25 10:52:50 +03:00
Aleksey Kladov
fcca35969d
allow dyn diagnostics
2019-03-25 10:52:12 +03:00
Aleksey Kladov
7e8f17188e
diagnostics
2019-03-25 10:52:12 +03:00
Ville Penttinen
4d26bae46d
Rename source_edit to source_file_edit to match file_system_edit
2019-03-25 09:13:58 +02:00
Ville Penttinen
b92fcbc956
Further improvements to the SourceChange convenience methods
...
Rename system_edit to file_system_edit, add more documentation, add
source_file_edit_from to create a SourceChange from `FileId` and `TextEdit`.
2019-03-25 09:03:10 +02:00
Ville Penttinen
22e1c7a112
Add convenience functions to SourceChange for creating single edits
2019-03-24 22:53:41 +02:00