Aleksei Trifonov
eda4046a05
Introduce postfix item types
2022-04-01 20:50:27 +03:00
Aleksei Trifonov
0d1f4f9b27
Lower postfix suggestions in completions list
2022-03-31 02:27:33 +03:00
Matthias Krüger
7912e33ed6
fix clippy::needless_borrow
2022-03-12 16:50:49 +01:00
Lukas Wirth
ab21cf2f4f
internal: Re-arrange ide_db modules
2022-03-06 19:04:04 +01:00
Lukas Wirth
82fccb971e
feat: Add very simplistic ident completion for format_args! macro input
2022-01-15 12:23:26 +01:00
Lukas Wirth
09ce5d81d0
fix: Fix postfix completion panic
2022-01-12 13:07:16 +01:00
Lukas Wirth
5360c9bd22
fix: Do not complete Drop::drop
, complete std::mem::drop
instead
2021-12-22 02:25:38 +01:00
Lukas Wirth
2a88b76041
Update tests
2021-12-17 16:39:21 +01:00
Lukas Wirth
9fe0f0d1d9
Add a few default snippets for VSCode
2021-12-17 16:24:29 +01:00
Lukas Wirth
96db0d8bdd
Add Semantics::original_ast_node for upmapping nodes out of macro files
2021-11-03 21:12:36 +01:00
Lukas Wirth
0468b11de7
Remove CompletionKind
in favor of CompletionItemKind
2021-10-27 17:23:43 +02:00
Lukas Wirth
722489e3ff
Remove filtered completion list usage in completion tests
2021-10-27 16:53:39 +02:00
Lukas Wirth
a932935d4e
Fix postfix completions panicking
2021-10-25 15:22:29 +02:00
Lukas Wirth
5ccaff3c97
Simplify
2021-10-11 21:49:50 +02:00
Lukas Wirth
041cfbe0f4
Render the expansion of snippets as their docs
2021-10-05 18:11:22 +02:00
Lukas Wirth
77cbf4adbc
Bring the implementation closer to VSCode snippet definitions
2021-10-05 17:18:40 +02:00
Lukas Wirth
2b17da60db
Resolve macros in snippet require items
2021-10-04 22:53:02 +02:00
Lukas Wirth
454ecd167c
Make multiple import edits work for completions
2021-10-04 21:44:33 +02:00
Lukas Wirth
046c85ef0c
Add custom non-postfix snippets
2021-10-04 19:22:41 +02:00
Lukas Wirth
88f213eadd
Initial implementation of custom postfix snippets
2021-10-04 17:49:21 +02:00
Lukas Wirth
7faa35cbbd
Simplify
2021-10-04 15:16:13 +02:00
Aleksey Kladov
2bf81922f7
internal: more reasonable grammar for blocks
...
Consider these expples
{ 92 }
async { 92 }
'a: { 92 }
#[a] { 92 }
Previously the tree for them were
BLOCK_EXPR
{ ... }
EFFECT_EXPR
async
BLOCK_EXPR
{ ... }
EFFECT_EXPR
'a:
BLOCK_EXPR
{ ... }
BLOCK_EXPR
#[a]
{ ... }
As you see, it gets progressively worse :) The last two items are
especially odd. The last one even violates the balanced curleys
invariant we have (#10357 ) The new approach is to say that the stuff in
`{}` is stmt_list, and the block is stmt_list + optional modifiers
BLOCK_EXPR
STMT_LIST
{ ... }
BLOCK_EXPR
async
STMT_LIST
{ ... }
BLOCK_EXPR
'a:
STMT_LIST
{ ... }
BLOCK_EXPR
#[a]
STMT_LIST
{ ... }
2021-09-26 19:16:09 +03:00
Lukas Wirth
b96f1adf5c
Give TypeInfo fields and methods more appropriate names
2021-08-03 17:28:51 +02:00
Lukas Wirth
25ff7171c4
Introduce TypeInfo
2021-08-03 16:41:53 +02:00
Lukas Wirth
9485d6efba
Fix some clippy lints in ide_completion
2021-07-21 19:52:10 +02:00
Lukas Wirth
3956a5b757
Simplify
2021-07-21 18:34:43 +02:00
mahdi-frms
7bae9c9187
add 'for' postfix completion
2021-07-11 17:10:57 +04:30
Aleksey Kladov
fbb9d69758
feat: always prefer postfix snippets if there's exact textual match
...
Note that, while we don't currently have a fuzzy-matching score, it
makes sense to special-case postfix templates -- it's very annoying when
`.not()` gets sorted before `.not`. We might want to move this infra to
fuzzy matching, once we have that!
2021-07-04 16:50:02 +03:00
Aleksey Kladov
a9623f3165
minor: use minicore
2021-06-18 23:38:19 +03:00
Aleksey Kladov
cc73abf72c
minor: use minicore
2021-06-18 23:33:01 +03:00
Lukas Wirth
aa644b5585
Move test_utils into tests module
2021-06-16 21:51:52 +02:00
Maan2003
c9b4ac5be4
clippy::redudant_borrow
2021-06-13 09:24:16 +05:30
Lukas Wirth
e475bcdcc6
Simplify CompletionContext by introducing a path CallKind enum
2021-06-06 20:02:26 +02:00
Lukas Wirth
9271941a95
Add MethodCall and FieldAccess variants to ImmediateLocation
2021-06-02 15:21:18 +02:00
Lukas Tobias Wirth
3f796fea9f
simplify
2021-05-05 22:55:12 +02:00
Aleksey Kladov
7e217a42e1
Unify naming
2021-03-12 12:22:45 +03:00
yonip23
99c4a41cd1
use references in CompletionItem's builder
2021-03-11 17:46:41 +02:00
Duong Do Minh Chau
73590f0f0b
Fix format
2021-03-09 16:38:07 +07:00
Duong Do Minh Chau
a068cedee0
Add trailing commas
2021-03-09 16:00:06 +07:00
Duong Do Minh Chau
ea835fc800
Update the test to match the change
2021-03-09 15:48:53 +07:00
Duong Do Minh Chau
5fc91058ff
Add completion to turn x.err into Err(x)
2021-03-09 15:36:41 +07:00
Aleksey Kladov
3db64a400c
rename completion -> ide_completion
...
We don't have completion-related PRs in flight, so lets do it
2021-02-17 17:53:31 +03:00