Commit graph

20 commits

Author SHA1 Message Date
Aleksey Kladov
6bbcfca7ae Fully add inline modules to module tree 2018-11-05 14:10:20 +03:00
Aleksey Kladov
6be50f7d5d Reformat all 2018-10-31 23:41:43 +03:00
Jeremy A. Kolb
406f366ccc Add DeclarationDescriptor and ReferenceDescriptor
Fixes #142
Fixes #146
2018-10-31 23:30:57 +03:00
bors[bot]
55ebe6380a Merge #167
167: Attempt to extract useful comments from function signatures r=matklad a=kjeremy

I'm trying to extract useful function comments for signature info. This will also be useful for hover.  This is a WIP (and actually works pretty well!) but I don't think it's the right approach long term so some guidance would be appreciated so that we could also get comments for say types and variable instances etc.

Currently `test_fn_signature_with_simple_doc` fails due to a bug in `extend` but we probably shouldn't use this approach anyway. Maybe comments should be attached to nodes somehow? I'm also thinking that maybe the markdown bits should live in the language server.

Thoughts?

Co-authored-by: Jeremy A. Kolb <jkolb@ara.com>
2018-10-31 19:41:24 +00:00
Aleksey Kladov
dfba29e4fb Add MockAnalysis to make testing easier 2018-10-31 22:35:01 +03:00
Jeremy A. Kolb
05eb489ec5 Useful comments from function signatures 2018-10-31 15:23:20 -04:00
Aleksey Kladov
f3fb59d707 Move completion to ra_analysis
While we should handle completion for isolated file, it's better
achieved by using empty Analysis, rather than working only with &File:
we need memoization for type inference even inside a single file.
2018-10-31 21:01:51 +03:00
Aleksey Kladov
e0eb33605a Encapsulate CrateGraph a bit 2018-10-25 17:40:24 +03:00
Aleksey Kladov
ee4d904cfb Store all the data in the Salsa Database 2018-10-25 16:25:40 +03:00
Aleksey Kladov
69d07df201 Complete crate:: paths 2018-10-24 18:37:25 +03:00
Aleksey Kladov
b636d23bec revive the test 2018-10-24 15:00:03 +03:00
Aleksey Kladov
dc477db757 Introduce ModuleId
Previously, module was synonym with a file, and so a module could have
had several parents. This commit introduces a separate module concept,
such that each module has only one parent, but a single file can
correspond to different modules.
2018-10-23 20:44:23 +03:00
Aleksey Kladov
8bb4380448 Fix tests 2018-10-20 22:43:36 +03:00
Jeremy A. Kolb
3746689e9d Implement Find All References for local variables 2018-10-18 13:40:12 -04:00
Jeremy A. Kolb
61f3a438d3 Cargo Format
Run `cargo fmt` and ignore generated files
2018-10-16 09:41:10 -04:00
Aleksey Kladov
7503c5528f fix tests 2018-10-15 21:54:12 +03:00
Jeremy A. Kolb
c9909f42ba A FnDescriptor shouldn't exist without a name 2018-10-12 07:54:57 -04:00
Jeremy A. Kolb
f8a2b53304 Language Server: textDocument/signatureHelp
Implements a pretty barebones function signature help mechanism in
the language server.

Users can use `Analysis::resolve_callback()` to get basic information
about a call site.

Fixes #102
2018-10-11 16:40:46 -04:00
Muhammad Mominul Huque
dc2b30e9b6
Replace HashMap, HashSet with FxHashMap and FxHashSet 2018-10-12 00:07:44 +06:00
Aleksey Kladov
b5021411a8 rename all things 2018-09-16 13:07:39 +03:00