Aleksey Kladov
92aa0f9c87
Don't use additional_text_edits API internally
2019-02-18 12:24:20 +03:00
Aleksey Kladov
79f35cc699
More orthogonal method naming
2019-02-18 12:07:47 +03:00
Aleksey Kladov
864fd5ee25
More compact debug representation for completion
2019-02-18 10:31:00 +03:00
Aleksey Kladov
e503ffe9ff
Don't render ()
in calls to assoc functions
2019-02-17 21:30:46 +03:00
bors[bot]
982f72c022
Merge #844
...
844: Refactor find_all_refs to return ReferenceSearchResult r=vipentti a=vipentti
This refactors `find_all_refs` to return a new `ReferenceSearchResult` based on feedback in #839 .
There are few questions/notes regarding the refactor:
1. Introducing `NavigationTarget::from_bind_pat` this simply forwards the call to `NavigationTarget::from_named`, could we just expose `from_named` directly as `pub(crate)` ?
2. Added an utility method `NavigationTarget::range` since there were few places where you would use `self.focus_range.unwrap_or(self.full_range)`
3. Implementing `IntoIterator` for `ReferenceSearchResult`. This turns `ReferenceSearchResult` into an iterator over `FileRanges` and allows previous code to mostly stay as it was based on the order that `find_all_refs` previously had (declaration first and then the references). I'm not sure if there is a way of doing the conversion to `IntoIter` without the allocation of a new vector
4. Is it possible to have a binding without a name? I'm not sure if the `NavigationTarget::from_bind_pat` can cause some edge-cases that previously were ok
This fixes #835 .
Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>
2019-02-17 15:38:33 +00:00
Ville Penttinen
fd5307e60d
Remove leading ::
2019-02-17 17:25:19 +02:00
Florian Diebold
795d718ba1
Unify with the autorefed/autoderefed receiver type during method resolution
2019-02-17 14:44:39 +01:00
Ville Penttinen
85a6bf3424
Refactor find_all_refs to return ReferenceSearchResult
2019-02-17 13:40:43 +02:00
Florian Diebold
0242acae53
Turn ImplBlock into a copy type just containing IDs
...
This makes it more like the other code model types.
Also make Module::definition_source/declaration_source return HirFileIds, to
make them more like the other source functions.
2019-02-16 22:08:13 +01:00
Aleksey Kladov
2d131d63f9
document design guideline
2019-02-16 15:15:52 +03:00
Aleksey Kladov
469301b603
use better label for &mut ref completion
2019-02-14 21:34:06 +03:00
bors[bot]
10bf61b83b
Merge #831
...
831: tweak postfix completions r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-02-14 17:38:51 +00:00
Aleksey Kladov
5f8ec8aa10
tweak postfix completions
...
* better label
* add refm for &mut
2019-02-14 20:38:26 +03:00
Aleksey Kladov
434f1520df
add ref postfix template
2019-02-14 20:13:39 +03:00
Jeremy Kolb
1cd5966462
Be precise about the argument list
...
Fixes #812
2019-02-14 10:28:48 -05:00
Florian Diebold
911e32bca9
Complete names from prelude
2019-02-13 21:13:08 +01:00
Florian Diebold
3a9934e2c3
Keep track of crate edition
2019-02-13 20:10:46 +01:00
Ville Penttinen
3973974de1
Fix possible issue where unnamed is_symbol_def would pop stack wrongly
...
This removes is_symbol_def as unnecessary.
2019-02-13 18:02:18 +02:00
Ville Penttinen
0c37a9cc28
Use cloned over map + clone
2019-02-13 17:42:15 +02:00
Ville Penttinen
d9905f7be5
Use clone directly rather than map + clone
2019-02-13 17:28:15 +02:00
Ville Penttinen
2ef6c469ef
Remove unnecessary braces
2019-02-13 11:08:25 +02:00
Ville Penttinen
dd6307ddc4
Add support for container_name in workspace/symbol query
2019-02-12 22:06:14 +02:00
Laurențiu Nicola
040fb91387
Filter attributes from the completion details/label
2019-02-12 20:35:10 +02:00
Pascal Hertleif
4fd3613434
Fix some typos
2019-02-12 15:02:57 +01:00
Laurențiu Nicola
7e8527f748
Implement completion for associated items
2019-02-12 12:51:01 +02:00
Aleksey Kladov
8ef80086a0
fix regression in self-referential completion
2019-02-11 23:43:24 +03:00
Aleksey Kladov
0d060b073c
remove hard-coded query-group macro
2019-02-11 22:24:39 +03:00
Aleksey Kladov
58ed8ee665
use extern prelude in Resolver
...
This fixes two bugs:
- completion for paths works again
- we handle extern prelude shadowing more correctly
2019-02-11 15:41:39 +03:00
Ville Penttinen
710975ecd8
Fix typo in Cargo.toml authors
...
Fixes typo introduced in #782
2019-02-11 10:20:04 +02:00
Ville Penttinen
ab3d231b1d
Update authors field in Cargo.tomls to "rust-analyzer developers"
...
This closes #777
2019-02-11 08:55:35 +02:00
Aleksey Kladov
12e3b4c70b
reformat the world
2019-02-08 14:49:43 +03:00
Aleksey Kladov
884f04670a
diagnostics is now a function
2019-02-08 14:34:30 +03:00
Aleksey Kladov
8328e196dd
move diagnostics to a separate file
2019-02-08 14:34:30 +03:00
Aleksey Kladov
e4a6343e47
move index_resolve to symbol index
2019-02-08 14:34:30 +03:00
Aleksey Kladov
5173c6295b
move find_references to references
2019-02-08 14:34:30 +03:00
Aleksey Kladov
4d0e58afef
rename rename to references
2019-02-08 14:34:30 +03:00
Aleksey Kladov
bddd124298
move crate for
2019-02-08 14:34:30 +03:00
Aleksey Kladov
842e8001b2
move changes to a separate file
2019-02-08 14:34:30 +03:00
kjeremy
6753051a45
Some clippy cleanups
2019-02-06 15:50:26 -05:00
Aleksey Kladov
0c5fd8f7cb
move assists to a separate crate
2019-02-06 17:00:00 +03:00
Jeremy Kolb
e696342afa
Rename assits to assists
2019-02-05 08:13:16 -05:00
bors[bot]
4183825475
Merge #740
...
740: Update dependencies r=kjeremy a=kjeremy
Co-authored-by: kjeremy <kjeremy@gmail.com>
Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
2019-02-05 12:16:25 +00:00
Florian Diebold
699ce06ac3
Complete extern prelude (again)
2019-02-04 22:09:56 +01:00
Florian Diebold
ccef48b6c3
Make it possible to have multiple crate in a mock analysis fixture
2019-02-04 21:49:34 +01:00
kjeremy
8ec4b84013
Bump insta and proptest to latest
2019-02-04 14:11:51 -05:00
Aleksey Kladov
dbf9820e35
make HirDatabase object-safe
2019-02-03 22:15:31 +03:00
gfreezy
bfaefed3f6
fill match arm
2019-02-04 00:27:36 +08:00
Hoàng Đức Hiếu
9dd7ccf609
fold complete_postfix tests into one
2019-02-03 20:12:57 +07:00
Hoàng Đức Hiếu
1c5a63e3db
add postfix completion for dbg!()
with .dbg
2019-02-02 22:10:18 +07:00
Florian Diebold
c5852f422f
Some cleanup and additional tests
2019-02-01 23:24:26 +01:00
Florian Diebold
d571d26955
Make the Resolution variants tuple variants
2019-02-01 22:54:30 +01:00
Florian Diebold
d3df80dfe4
Cleanup
2019-02-01 22:54:21 +01:00
Florian Diebold
afce8e4426
Use the new Resolver API for goto def
2019-02-01 22:45:43 +01:00
Florian Diebold
33ff7b56ff
Use the new Resolver API in completion
2019-02-01 22:45:25 +01:00
csmoe
4dffdcf14a
split HirDatabase api
2019-02-01 22:05:24 +08:00
Aleksey Kladov
de85f1e947
remove hard-coded support for ctry macro
...
It was used mainly to prevent HirFileId infra from bitroting, but the
`vec![]` macro can serve that just as well!
2019-02-01 10:52:36 +03:00
kjeremy
f0fdc9d5c0
Go To Implementation for Trait
2019-01-31 18:34:52 -05:00
bors[bot]
b704ce803b
Merge #702
...
702: Go to Implementation r=matklad a=kjeremy
First half of #620
Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
Co-authored-by: kjeremy <kjeremy@gmail.com>
2019-01-30 19:19:31 +00:00
kjeremy
04eb15856b
Resolve crate
2019-01-30 13:18:21 -05:00
Jeremy Kolb
b88ba007cc
Pass Documentation up to LSP and add "rust" to our codeblocks there
2019-01-29 21:39:09 -05:00
Jeremy Kolb
3c17643b30
Go to Implementation for structs and enums
2019-01-29 19:13:02 -05:00
Aleksey Kladov
2ee08098a6
opt-in jemalloc
2019-01-28 15:52:21 +03:00
bors[bot]
7abe1f422c
Merge #678
...
678: WIP: automatically collect garbage r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-01-28 11:39:02 +00:00
Aleksey Kladov
53e3e82d91
update salsa
2019-01-28 13:53:32 +03:00
Florian Diebold
cf5c99271d
Sort completions in tests
2019-01-27 22:51:20 +01:00
Aleksey Kladov
b4c8baadb1
tweak words
2019-01-27 22:57:18 +03:00
Aleksey Kladov
c7f4e3a401
show jemalloc
2019-01-27 22:57:18 +03:00
Aleksey Kladov
09b5dc8e02
drop obsolete comment
2019-01-27 22:57:18 +03:00
Aleksey Kladov
7801f6b50f
automatically collect garbage
2019-01-27 22:57:18 +03:00
bors[bot]
3f4f50baaa
Merge #690
...
690: Fix module resolution for non standard filenames r=matklad a=regiontog
fixes #668
Co-authored-by: Erlend Tobiassen <erlend.tobiassen@gmail.com>
2019-01-27 15:55:47 +00:00
bors[bot]
b2b62b9579
Merge #691
...
691: remove dead code r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-01-27 15:08:23 +00:00
Aleksey Kladov
154bce1864
remove dead code
2019-01-27 18:07:45 +03:00
Erlend Tobiassen
5052bf9889
Update test to use correct paths
2019-01-27 15:19:41 +01:00
bors[bot]
ffcf618842
Merge #662
...
662: Preserve indentation in doc comments r=matklad a=kjeremy
Fixes #502
Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
2019-01-27 08:21:04 +00:00
Aleksey Kladov
f78b092629
fix panic in call info
...
closes #317
closes #675
2019-01-27 00:34:18 +03:00
Jeremy Kolb
a892067951
Make doc comments optional
2019-01-26 10:35:23 -05:00
Aleksey Kladov
9457b1f0e6
rename source_file -> parse
2019-01-26 11:51:36 +03:00
Aleksey Kladov
4711cbcace
rename FilesDatabase -> SourceDatabase
2019-01-26 11:20:30 +03:00
Aleksey Kladov
3223de5976
move ide queries to ide db
2019-01-26 11:17:05 +03:00
Aleksey Kladov
be1a005ebd
fold syntax database into files database
2019-01-26 11:09:39 +03:00
Aleksey Kladov
1fd18f020d
⬆️ salsa
2019-01-25 23:27:16 +03:00
Aleksey Kladov
27a085f79e
print one size for symbols
2019-01-25 23:06:23 +03:00
Jeremy A. Kolb
7a0bc2dd64
Add docs to struct fields
2019-01-25 14:29:56 -05:00
Aleksey Kladov
50a7598773
print one size for symbols
2019-01-25 21:10:51 +03:00
bors[bot]
aae69bc897
Merge #647
...
647: fix todo r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-01-25 18:01:56 +00:00
Aleksey Kladov
d0cf4306bd
fix todo
2019-01-25 20:55:38 +03:00
bors[bot]
cc73d3ccbc
Merge #646
...
646: Add module documentation support r=matklad a=kjeremy
Co-authored-by: Jeremy A. Kolb <jkolb@ara.com>
2019-01-25 17:55:29 +00:00
Jeremy A. Kolb
6588579116
Add module documentation support
2019-01-25 12:51:36 -05:00
bors[bot]
daaba4be17
Merge #645
...
645: WIP: support goto for fields. r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-01-25 17:38:49 +00:00
Aleksey Kladov
9f2574c97e
add ability to get strcut field source
2019-01-25 20:38:03 +03:00
bors[bot]
bce0c6267a
Merge #644
...
644: EnumVariant details for completion r=matklad a=kjeremy
Co-authored-by: Jeremy A. Kolb <jkolb@ara.com>
2019-01-25 17:02:30 +00:00
Jeremy A. Kolb
9a97c10fda
EnumVariant details for completion
2019-01-25 11:50:59 -05:00
Aleksey Kladov
f6adb85b68
add gc request
2019-01-25 19:11:58 +03:00
Aleksey Kladov
046ae1d361
more stats
2019-01-25 17:25:23 +03:00
Aleksey Kladov
8d68b76ba0
better stats
2019-01-25 16:16:42 +03:00
bors[bot]
021e691997
Merge #639
...
639: Update salsa r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-01-25 12:34:10 +00:00
Aleksey Kladov
08c12e424d
use set methods
2019-01-25 15:25:01 +03:00
Aleksey Kladov
8cf092d5de
:arrow_up salsa
2019-01-25 15:16:50 +03:00
Aleksey Kladov
87ac5f5b36
use positional ids for fields
2019-01-25 14:21:14 +03:00
Aleksey Kladov
87288d802c
pack enum variants into arena
2019-01-25 12:50:46 +03:00