Kevaundray Wedderburn
72b9a4fbd3
Change <|> to $0 - Rebase
2021-01-07 12:09:23 +00:00
Aleksey Kladov
f8a0561178
Align config's API with usage
...
The config now is mostly immutable, optimize for that.
2021-01-06 21:22:24 +03:00
Nick Spain
5c659c21dd
Handle case where detail doesn't exist without giving up on completion
...
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-01-02 21:53:52 +11:00
Nick Spain
7bfec89cf9
Make the result of Const, FunctionRender and TypeAliasRender constructors optional
...
They use source() which now returns an Option so they need to too.
2021-01-02 21:53:52 +11:00
Nick Spain
14d0db0759
HasSource::source_old -> HasSource::source for places where proc-macros were special cased
...
In #6901 some special case handling for proc-macros was introduced to
prevent panicing as they have no AST. Now the new HasSource::source
method is used that returns an option.
Generally this was a pretty trivial change, the only thing of much
interest is that `hir::MacroDef` now implements `TryToNav` not `ToNav`
as this allows us to handle `HasSource::source` now returning an option.
2021-01-02 21:53:52 +11:00
Nick Spain
ea4708c444
Mark HasSource::source_old as deprecated but allow at all call sites
2021-01-02 21:53:51 +11:00
Nick Spain
27cadcd531
HasSource::source -> HasSource::source_old
...
To start migrating HasSource::source to return an Option.
2021-01-02 21:53:51 +11:00
Lukas Wirth
83121efcd5
Reduce some more code duplication
2020-12-22 19:00:38 +01:00
Lukas Wirth
2cd2947bf8
Insert snippet positions after fields names in record patterns
2020-12-21 15:10:27 +01:00
Lukas Wirth
33ecad4407
Create non-exhaustive patterns for non_exhaustive attributed items
2020-12-20 20:13:06 +01:00
Lukas Wirth
a5874a38cb
Reduce code duplication in pattern completion
2020-12-20 19:20:55 +01:00
Lukas Wirth
2f6a24950a
Emit snippets for struct pattern completion if enabled
2020-12-20 19:16:28 +01:00
Lukas Wirth
b184bfad7a
Add completions for patterns
2020-12-20 18:19:23 +01:00
Aleksey Kladov
f6ed16674c
Align code_model name with ungrammar
2020-12-20 10:05:24 +03:00
Edwin Cheng
60a3785ac2
Temp fixes panic caused by no ast for proc-macro
2020-12-18 10:26:17 +08:00
Jonas Schievink
c1cb595382
Move to upstream macro_rules!
model
2020-12-15 15:37:37 +01:00
Jeremy Kolb
26a1675764
Remove some redundant allocations
2020-12-12 12:27:09 -05:00
Kirill Bulatov
3183ff3a7b
Disable the completion for no corresponding client resolve capabilities
2020-12-08 01:07:20 +02:00
Kirill Bulatov
f6d2540df0
Simplify import edit calculation
2020-12-07 23:41:08 +02:00
Kirill Bulatov
68a747efe0
Remove redundant code
2020-12-07 23:41:08 +02:00
Kirill Bulatov
50e06ee95a
Refactor the code
2020-12-07 23:41:08 +02:00
Kirill Bulatov
d9bd1f171d
Add eager resolve capability
2020-12-07 23:41:08 +02:00
Aleksey Kladov
9d94ffad44
Place cursor correctly when completing assoc fns with self
2020-12-01 14:28:50 +03:00
Aleksey Kladov
02955661a0
Fix typo
2020-12-01 13:56:46 +03:00
Aleksey Kladov
6f51f728a1
Type-safer API for dealing with parameter lists with optional self
2020-12-01 13:53:39 +03:00
Kirill Bulatov
f75f07019b
Group import data in a struct
2020-11-27 18:30:10 +02:00
Kirill Bulatov
f4ae3650d8
Extract the import code into the shared module
2020-11-27 18:28:41 +02:00
Kirill Bulatov
b2e6ca46ca
Profile completions better
2020-11-27 18:00:03 +02:00
Kirill Bulatov
d4128beb3d
Avoid turning completion objects into builders
2020-11-16 23:16:41 +02:00
Kirill Bulatov
1598740292
Reuse existing element rendering
2020-11-16 21:19:06 +02:00
Kirill Bulatov
1e458efe62
Add braces to functions and macros
2020-11-16 21:19:06 +02:00
Igor Aleksanov
4d333ebb63
Get rid of do-er antipattern
2020-11-03 10:33:13 +03:00
Igor Aleksanov
2a214e15d3
Add doc-comments to the new files
2020-11-03 10:16:35 +03:00
Igor Aleksanov
97a504805d
Move rendering tests to the render module
2020-11-03 10:16:35 +03:00
Igor Aleksanov
15b16917fc
Add TypeAliasRender
2020-11-03 10:16:35 +03:00
Igor Aleksanov
944ccf6075
Add ConstRender
2020-11-03 10:16:35 +03:00
Igor Aleksanov
fc8a1cd800
Introduce render module
2020-11-03 10:16:35 +03:00