kjeremy
36cc81ac71
Move AssistKind into AssistId
2020-07-02 17:48:35 -04:00
Jeremy Kolb
b98c16a034
Categorize assists
2020-07-02 17:13:02 -04:00
Jonas Schievink
31f5b48817
Record and suggest trait items via ImportMap
2020-07-02 12:43:52 +02:00
Laurențiu Nicola
c1139a5a44
Use the existing Semantics in auto_import
2020-07-01 11:48:15 +03:00
Laurențiu Nicola
331e6d8f16
Remove db from AssistsContext
2020-07-01 10:25:59 +03:00
Aleksey Kladov
aa69757a01
More principled indentation trimming in fixtures
2020-06-23 23:33:41 +02:00
Jonas Schievink
7e83ed99a8
Respect casing when searching for imports
2020-06-10 16:04:55 +02:00
Jonas Schievink
781b514e58
Add test for macro generated items
2020-06-10 12:38:58 +02:00
Jonas Schievink
a70a0ca73c
ImportsLocator: use ImportMap for non-local crates
2020-06-10 12:38:58 +02:00
Aleksey Kladov
65fa586410
Relax cursor position tests in assists
...
Those will be replaced with snippets anyway
2020-05-20 22:55:37 +02:00
Aleksey Kladov
45e343a0ef
Minor
2020-05-20 10:20:21 +02:00
Aleksey Kladov
4867968d22
Refactor assists API to be more convenient for adding new assists
...
It now duplicates completion API in its shape.
2020-05-07 16:27:54 +02:00
Aleksey Kladov
233f01c9ba
Move target to AssistLabel
...
Target is used for assists sorting, so we need it before we compute
the action.
2020-05-06 12:51:28 +02:00
Aleksey Kladov
25e6bbde01
Merge assits::test_helpers and tests
2020-05-06 10:16:55 +02:00
Edwin Cheng
2034002413
Support auto-import in macro
2020-05-03 03:24:55 +08:00
Kirill Bulatov
dd3b64124b
Add a test
2020-03-24 10:43:24 +02:00
Kirill Bulatov
944f28fe5b
Use more generic public api
2020-03-24 10:43:22 +02:00
Kirill Bulatov
d221ff4f9e
Auto import macros
2020-03-24 10:43:00 +02:00
Aleksey Kladov
7e2bca4ec3
Cleanup imports
2020-03-19 12:36:33 +01:00
Kirill Bulatov
0ff8c55246
Unfold groups with single assists into plain assists
2020-03-06 00:17:26 +02:00
Aleksey Kladov
067cb928f0
Simplify
2020-02-28 22:43:13 +01:00
Aleksey Kladov
ff42008679
Move insert_use util to utils
2020-02-28 21:53:20 +01:00
Aleksey Kladov
c3a4c4429d
Refactor primary IDE API
...
This introduces the new type -- Semantics.
Semantics maps SyntaxNodes to various semantic info, such as type,
name resolution or macro expansions.
To do so, Semantics maintains a HashMap which maps every node it saw
to the file from which the node originated. This is enough to get all
the necessary hir bits just from syntax.
2020-02-26 12:55:50 +01:00
Kirill Bulatov
e4f4cd77a0
Do not collect all traits
2020-02-12 23:27:19 +02:00
Kirill Bulatov
e008b08054
Support associated consts
2020-02-12 22:38:19 +02:00
Kirill Bulatov
3ccf8b746a
Also consider associated constants
2020-02-12 18:52:29 +02:00
Kirill Bulatov
afc1d18ff3
Fix post-rebase issues
2020-02-12 17:18:42 +02:00
Kirill Bulatov
acf5f43639
Refactor the code
2020-02-12 17:18:42 +02:00
Kirill Bulatov
07058cbf9f
Adjust the assist group name
2020-02-12 17:18:42 +02:00
Kirill Bulatov
24f7028d3f
Add profiling
2020-02-12 17:18:42 +02:00
Kirill Bulatov
d5c3808545
Support trait method call autoimports
2020-02-12 17:18:42 +02:00
Kirill Bulatov
8f959f20ee
Trait location draft
2020-02-12 17:18:42 +02:00
Kirill Bulatov
9b6db7bbd4
Refactor path for imports extraction
2020-02-12 17:18:42 +02:00
Kirill Bulatov
2b9b16cb45
Add method tests
2020-02-12 17:18:41 +02:00
Kirill Bulatov
24ab3e80ca
Resolve methods and functions better
2020-02-12 17:18:41 +02:00
Kirill Bulatov
d39d401612
Fix rebase leftovers
2020-02-09 17:25:51 +02:00
Kirill Bulatov
48abcaaabe
Do not import anything if first segment of FQN resolves
2020-02-09 17:22:59 +02:00
Aleksey Kladov
fe141a8c10
Set auto-import target
...
closes #3067
2020-02-09 16:14:07 +01:00
Aleksey Kladov
fb99831cb0
Slightly simpler API for groups
2020-02-09 14:30:27 +01:00
Kirill Bulatov
740a26b7d2
Rename add import assist
2020-02-07 23:53:08 +02:00
Aleksey Kladov
561b4b11ff
Name assist handlers
2020-02-07 17:28:02 +01:00