Aleksey Kladov
8c4919c9fd
Fix goto definition for type alias type parameters
...
closes https://github.com/rust-analyzer/rust-analyzer/issues/5042
2020-07-11 12:45:30 +02:00
Aleksey Kladov
b85042601d
Goto type definition works for self
2020-07-10 14:08:35 +02:00
Aleksey Kladov
4484908a86
Rewrite goto definition tests
2020-06-30 13:03:08 +02:00
Aleksey Kladov
be265ece02
Add example expect test for goto definition
2020-06-27 19:22:31 +02:00
Aleksey Kladov
aa69757a01
More principled indentation trimming in fixtures
2020-06-23 23:33:41 +02:00
BGluth
3a3b40a554
Created goto Self enum variant test
2020-06-21 13:27:16 -06:00
unexge
48b6dd0b33
Use explicit match for extracting def from classify_name
2020-06-08 15:38:10 +03:00
unexge
c5d5d21858
Add FieldShorthand
variant to NameClass
2020-06-08 14:46:58 +03:00
unexge
73684a4ae2
Add goto def for enum variant field
2020-06-06 22:16:59 +03:00
Aleksey Kladov
8915183d7d
Don't require module docs for Features and Assists
2020-05-31 09:59:38 +02:00
Aleksey Kladov
f593393ebb
Specify actions
2020-05-31 09:45:41 +02:00
Aleksey Kladov
c8f27a4a88
Generate features docs from source
2020-05-31 01:54:54 +02:00
Aleksey Kladov
5258c817f7
Remove cross-crate marks
...
They create quite a bit of friction. Really, we should just move the
tests to the same crate, rather than paper over existing split.
2020-05-20 13:00:50 +02:00
bors[bot]
b1a5dc8c8b
Merge #4269 #4293
...
4269: add support of use alias semantic in definition r=matklad a=bnjjj
close #4202
4293: no doctests for flycheck r=matklad a=matklad
bors r+
🤖
Co-authored-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-05-04 10:34:06 +00:00
Aleksey Kladov
710e430dbb
Fix focus range for TypeParam
...
closes #4274
2020-05-04 12:25:32 +02:00
Benjamin Coenen
99c2ca8494
add support of use alias semantic in definition #4202
...
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
2020-05-02 21:42:27 +02:00
Benjamin Coenen
19e28888aa
wip
...
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
2020-05-01 16:26:22 +02:00
Aleksey Kladov
8843588fca
Convert tests to text-size
2020-04-25 11:59:18 +02:00
Aleksey Kladov
fa2ea8f494
Fix goto definition for record patterns
2020-04-18 22:11:49 +02:00
Aleksey Kladov
2ccfb49bab
Always expand macros during analysis
2020-03-25 13:53:15 +01:00
Aleksey Kladov
de7662c852
Check that no file contains trailing ws
...
rustfmt allows trailing spaces in string literals unfortunately.
2020-03-17 11:42:54 +01:00
Edwin Cheng
fe78a14bbb
Support local macro_rules
2020-03-14 14:25:51 +08:00
Aleksey Kladov
19115e9fab
Support cross-crate marks
2020-03-04 11:55:25 +01:00
Aleksey Kladov
53cab1cd21
Fix imports
2020-03-03 18:54:39 +01:00
Aleksey Kladov
177229bfde
Move reference classification to ra_ide_db
...
Lost some marks along the way :-(
2020-03-03 18:50:15 +01:00
Aleksey Kladov
2716a1fa3f
More principled approach for gotodef for field shorhand
...
Callers can now decide for themselves if they should prefer field or
local definition. By default, it's the local.
2020-03-02 19:00:38 +01:00
Aleksey Kladov
a1e1869554
Rename ast::ImplBlock -> ast::ImplDef
2020-02-29 21:33:15 +01:00
Aleksey Kladov
209eb32796
Classify name takes const patterns into account
2020-02-28 15:27:52 +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
Aleksey Kladov
fda118f4e9
Simplify
2020-02-22 16:59:31 +01:00
Aleksey Kladov
372439dec8
Merge NameDefinition and NameKind
2020-02-19 14:56:22 +01:00
Aleksey Kladov
ae70d07237
Rename
2020-02-07 14:26:59 +01:00
Aleksey Kladov
f55be75a17
Remove irrelevant distinction
2020-02-07 14:25:16 +01:00
Aleksey Kladov
88267c86c0
cleanup imports
2020-02-06 14:03:45 +01:00
Aleksey Kladov
ad247aa670
Move symbol_index
2020-02-06 12:22:35 +01:00
Aleksey Kladov
9a6c26e348
Move module to SourceBinder
2020-01-16 16:53:11 +01:00
Aleksey Kladov
11d6b9dadd
Only new-style classification
2020-01-15 16:52:28 +01:00
Edwin Cheng
4a7e19946a
Fix parser for macro call in pattern position
2019-12-20 23:26:04 +08:00
Aleksey Kladov
3d4b48e481
Fix resolve for field init shorthand
2019-12-20 14:48:14 +01:00
Aleksey Kladov
a04177f135
Add local functions to bodies
2019-12-20 11:52:17 +01:00
Aleksey Kladov
7c25224f05
Don't bother with focus range for navigation to locals
2019-12-18 16:45:42 +01:00
Aleksey Kladov
46a299bcee
Refactor goto tests to always specify texts
2019-12-18 16:00:35 +01:00
Aleksey Kladov
69c944a1e2
Add blank lines for readability
2019-12-18 16:00:35 +01:00
bors[bot]
4a58522119
Merge #2562
...
2562: Fix NavigationTarget ranges r=matklad a=edwin0cheng
Fix the issue described in https://github.com/rust-analyzer/rust-analyzer/pull/2544#issuecomment-565572553
This PR change the order for finding `full_range` of `focus_range` in following orders:
1. map both ranges to macro_call
2. map focus range to a token inside macro call, and full range to the whole of macro call
3. map both ranges to the whole of macro call
And fix the corresponding tests and make these tests easily to follow.
Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
2019-12-17 13:37:32 +00:00
Edwin Cheng
61360fdfec
Fix original_source find order
2019-12-15 01:24:51 +08:00
succcubbus
c82529a97f
for goto and hover pick the token based on a priority
2019-12-13 22:00:05 +01:00
succcubbus
4f7da04c67
add tests for goto on tuple fields
2019-12-13 21:59:25 +01:00
succcubbus
4df741ecb2
fix goto definition when inbetween tokens
...
fixes both goto_definition and goto_type_definition.
before, when running goto between some non-trivia token and an
identifier, goto would be attempted for the non-trivia token.
but this does not make sense for e.g. L_PAREN or COLONCOLON only for
IDENTs. now only IDENTs will be searched for in goto actions.
2019-12-13 19:20:02 +01:00
Aleksey Kladov
b683cbd93d
Report correct original range in goto_definition
2019-12-09 19:46:35 +01:00
Florian Diebold
2223620313
Fix range in goto_through_format test
2019-12-08 13:02:52 +01:00