Lukas Wirth
8a5829cf28
Re-order mod declarations
2024-01-27 11:02:34 +01:00
Johann Hemmann
b1a0c9ac40
single_match
2024-01-19 18:31:15 +01:00
Lukas Wirth
83591268ab
minor: Make use of some new SmolStr
improvements
2024-01-17 13:47:15 +01:00
dfireBird
257870e09f
add tests to verify relevance of notable traits and some refactors
2024-01-10 16:30:22 +05:30
dfireBird
df5c647982
add notable_trait predicate to CompletionRelevance
...
implement the predicate set on the case function from traits
2024-01-08 20:34:11 +05:30
Luiz Carvalho
9a36bc393d
fix(completion): render fn type
2024-01-02 10:30:16 -03:00
Lukas Wirth
1475848250
Cleanup
2023-12-08 13:31:31 +01:00
Jessie Chatham Spencer
6abba17a5b
Implement function type matching
2023-12-08 12:37:26 +01:00
Jessie Chatham Spencer
14a7a614c1
WIP - Sort suggested imports by type for data types
2023-12-08 12:37:26 +01:00
dfireBird
20c6f27024
Insert fn call parens only if the parens inserted around field name
2023-12-04 22:37:34 +05:30
dfireBird
b7effe54ee
fix close parens position to move after field access
2023-12-01 18:55:26 +05:30
dfireBird
5c0c8ceaf7
refactor complete_fn_fields
function and correct branch checks
2023-11-28 22:21:57 +05:30
dfireBird
8296b16f38
fix the insertion of the surronding parens
...
Before it was inserting whenever function field is found but it should
happend only in the case of function call.
2023-11-28 22:21:57 +05:30
dfireBird
aa1cf8d357
add tests for tuple fields and expect fn type cases
2023-11-28 22:21:57 +05:30
dfireBird
eedeb58a4e
refactor obtaining receivers into idiomatic way
...
variable name change for clearer usage indication
2023-11-28 22:21:57 +05:30
dfireBird
5bcafd7dc0
add tests for the completion of the callable field
2023-11-28 22:21:57 +05:30
dfireBird
7cf3ab4bd2
implement completion render for callable fields
2023-11-28 22:21:57 +05:30
dfireBird
a0e690a7e9
add different completion for fn fields
2023-11-28 22:21:57 +05:30
Andrew Hlynskyi
f0adf8c4ec
Update tests
2023-11-24 14:38:00 +02:00
Lukas Wirth
b1575528c0
Move doc comment handling into ide-db
2023-09-02 16:27:26 +02:00
Lukas Wirth
c7ef6c25b7
internal: Replace Display impl for Name
2023-05-24 20:55:12 +02:00
hecatia-elegua
33ee157f3b
Render alias text for use imports
...
* removes one method breaking the flow
2023-04-06 17:25:30 +02:00
hecatia-elegua
410acd7188
Add doc(alias)-based field completion
2023-04-05 19:28:55 +02:00
hecatia-elegua
0863389dd1
Add doc-alias based completion
2023-03-29 14:08:25 +02:00
Ryo Yoshida
29c957f973
Lower and handle trait aliases in HIR
2023-03-04 00:24:07 +09:00
Lukas Wirth
404a51f26a
internal: Make CompletionItem more POD-like
2023-02-16 09:29:55 +01:00
Lukas Wirth
23fc596e40
Don't reconstruct ref match completion in to_proto manually
2023-02-15 14:15:22 +01:00
Lukas Wirth
cade9f7020
Trigger call info for more completions of signature having things
2023-02-14 17:05:07 +01:00
Duong Quoc Khanh
a7df61f1d3
Add postfix completion for unsafe
.
...
Wrap receiver_text with { } if it's not a BlockExpr.
2023-02-07 23:55:44 +09:00
Yuri Astrakhan
e16c76e3c3
Inline all format arguments where possible
...
This makes code more readale and concise,
moving all format arguments like `format!("{}", foo)`
into the more compact `format!("{foo}")` form.
The change was automatically created with, so there are far less change
of an accidental typo.
```
cargo clippy --fix -- -A clippy::all -W clippy::uninlined_format_args
```
2022-12-24 14:36:10 -05:00
Yuri Astrakhan
1d59c7b667
Remove non-needed clones
...
I am not certain if this will improve performance,
but it seems having a .clone() without any need should be removed.
This was done with clippy, and manually reviewed:
```
cargo clippy --fix -- -A clippy::all -D clippy::redundant_clone
```
2022-12-23 02:20:03 -05:00
Lukas Wirth
6c5d15800e
fix: Fix reference autocompletions using incorrect offsets in macro inputs
...
Fixes https://github.com/rust-lang/rust-analyzer/issues/13035
2022-08-23 14:29:59 +02:00
yue4u
91358bd937
fix: format literal lookup
2022-08-16 01:24:21 +09:00
Ryo Yoshida
8fe73a2240
Make tests pass
2022-08-11 01:16:35 +09:00
Ryo Yoshida
4322cf7f5b
Remove EscapedName
2022-08-11 01:11:18 +09:00
Lukas Wirth
f867ddc621
fix: Order ItemScope::entries results
2022-07-28 19:28:56 +02:00
Lukas Wirth
ce7541260d
fix: Don't complete marker traits in expression position
2022-07-28 17:50:49 +02:00
Dorian Scheidt
77acb5c162
fix: Autocomplete for struct fields includes receiver
...
fixes #12857
2022-07-24 09:07:43 -05:00
Amos Wenger
7e285e1ef5
Run cargo fmt
2022-07-20 15:06:15 +02:00
Amos Wenger
816f7fe12a
Run cargo fix --edition-idioms
2022-07-20 15:02:08 +02:00
hi-rustin
15016bc09f
Find original as node before compute ref match
...
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2022-07-18 23:24:19 +08:00
Hongxu Xu
f536766efb
complete raw identifier with "r#" prefix
2022-06-26 14:45:30 +08:00
Lukas Wirth
8b078986dc
Reimplement auto-ref completions for fields
2022-06-20 20:22:51 +02:00
Lukas Wirth
46d22719fc
Remove pattern rendering hack
2022-06-20 20:16:40 +02:00
Lukas Wirth
06ee4d6222
fix: Fix auto-ref completions inserting into wrong locations
2022-06-20 18:59:57 +02:00
Lukas Wirth
6e9c963348
internal: Lift out IdentContext from CompletionContext
2022-06-20 17:41:04 +02:00
Lukas Wirth
309ecdd71c
internal: NameRefKind classification is not optional
2022-06-18 08:58:47 +02:00
Lukas Wirth
00fdb4a3d8
Only run completion functions if their corresponding context is active
2022-06-17 23:36:39 +02:00
Lukas Wirth
a2a74bf278
Remove some of the unnecessary helpfer functions from CompletionContext
2022-06-03 20:49:25 +02:00
Lukas Wirth
c5dcc77b40
Fix visibility mods not being completed for field defs
2022-06-03 15:42:28 +02:00