Kartavya Vashishtha
87658c8173
refactor hover
...
change struct_rest_pat to guarentee a HoverResult
Move token and node matching out of struct_rest_pat into hover
2022-11-19 21:22:10 +05:30
Kartavya Vashishtha
8b17681058
fix formatting
...
and remove unnecessary check
2022-11-19 11:34:49 +05:30
Kartavya Vashishtha
a778203db9
simplify ancestor climbing to not consider macros
2022-11-19 11:17:43 +05:30
Kartavya Vashishtha
0ffb361eb9
feat: adds hover hint to ".." in record pattern
...
currently only works with struct pattern
2022-11-19 11:10:47 +05:30
Lukas Wirth
8047512dca
Revert "feat: Diagnose some incorrect usages of the question mark operator"
2022-10-18 14:18:59 +02:00
Lukas Wirth
381366f1dd
Diagnose incorrect usages of the question mark operator
2022-10-16 12:58:24 +02:00
OleStrohm
3931e55aee
Fixed lints
2022-09-12 21:27:19 +01:00
OleStrohm
177ec82a41
Rebased
2022-09-12 21:02:30 +01:00
OleStrohm
5313bd1984
Cleaned up code based on feedback
2022-09-12 20:20:45 +01:00
OleStrohm
301b8894ea
Added more consteval tests and fixed consteval result
2022-09-12 20:20:45 +01:00
OleStrohm
ad0a6bf1a3
Added consteval tests
2022-09-12 20:20:43 +01:00
OleStrohm
2f84b6e2e5
Almost there
2022-09-12 20:20:22 +01:00
OleStrohm
b63234e20b
Cleaned up code
2022-09-12 20:19:49 +01:00
OleStrohm
997fc46efa
Implemented basic enum const eval
2022-09-12 20:19:13 +01:00
Chayim Refael Friedman
26b5f1f92f
Do not insert a newline after ;
if the next token is a }
...
This creates double newline.
2022-09-04 14:33:15 +00:00
Chayim Refael Friedman
e295f0c29c
Insert whitespaces into static & const bodies if they are expanded from macro on hover
...
Macro expansion erases whitespace information, and so we end with invalid Rust code.
2022-09-04 14:33:15 +00:00
Jonas Schievink
0616cee92b
Add a setting for keyword hover popups
2022-08-16 16:51:40 +02:00
Lukas Wirth
d6e78b04d0
feat: Handle operators like their trait functions in the IDE
2022-08-05 14:16:36 +02:00
Lukas Wirth
ddad2847ab
Allow name querying for derive helpers
2022-07-26 09:27:22 +02:00
Lukas Wirth
aa1491ecde
Record derive helper attributes, resolve them in IDE layer
2022-07-26 09:26:51 +02:00
Amos Wenger
816f7fe12a
Run cargo fix --edition-idioms
2022-07-20 15:02:08 +02:00
Artur Sinila
b9b42e8670
tests: add hover tests for const generics
2022-07-17 02:13:09 +03:00
Lukas Wirth
531e152390
fix: Simplify macro statement expansion handling
2022-07-01 14:49:30 +02:00
Raymond Luo
5107123f9a
clarify comment and add autolink test case
2022-06-23 19:02:30 -04:00
Lukas Wirth
9b9c13fc40
feat: On assoc item name hover, render trait decl docs
2022-06-13 11:57:33 +02:00
feniljain
25f3e7a33c
fix: float display impl
2022-05-31 10:13:03 +05:30
feniljain
1f4870ff1c
fix: f32 and f64 representation during lowering
2022-05-26 20:03:05 +05:30
rainy-me
3a380d4b3a
fix: special case base url of BuiltinType
to core
2022-05-22 18:50:40 +09:00
Laurențiu Nicola
9856144b0b
Lower values of char and byte literals
2022-05-05 08:12:08 +03:00
rainy-me
5f4351fbb6
fix: doc url link type
2022-05-05 00:41:29 +09:00
Lukas Wirth
b6e19add06
minor: Add a test for display rendering record variants
2022-05-02 12:51:00 +02:00
bitgaoshu
5d1aff3357
#11973 associated type is unresolved
2022-04-24 20:51:48 +08:00
Lukas Wirth
7f3572fa0d
Simplify
2022-04-10 20:02:06 +02:00
Lukas Wirth
75689f2ad8
internal: Enforce Resolver to always have a module scope
2022-03-31 11:12:08 +02:00
hkalbasi
22eaee25b8
organize const eval tests
2022-03-24 13:20:35 +04:30
hkalbasi
0e2989e421
Support constants in const eval
2022-03-24 13:09:22 +04:30
hkalbasi
b301b040f5
Add const generics
2022-03-14 14:38:37 +03:30
Matthias Krüger
7912e33ed6
fix clippy::needless_borrow
2022-03-12 16:50:49 +01:00
Lukas Wirth
6c8c02f625
Don't parse source files to generate macro completion details
2022-03-10 22:21:58 +01:00
Lukas Wirth
4e94fb7028
Fix ProcMacroData recording wrong name for derives
2022-03-09 01:13:38 +01:00
Lukas Wirth
ab21cf2f4f
internal: Re-arrange ide_db modules
2022-03-06 19:04:04 +01:00
Lukas Wirth
b454f11f38
Fix hover for Self
keyword
2022-03-05 23:47:44 +01:00
Andy Russell
49fab593ad
show variadic args in hover function signature
2022-03-04 16:44:31 -05:00
bors[bot]
908c17bfa6
Merge #11595
...
11595: fix: lower string literals with actual value instead of default r=lnicola a=tysg
Fixes #11582 . Some questions below in the code review section.
Co-authored-by: Tianyi Song <42670338+tysg@users.noreply.github.com>
2022-03-04 20:21:43 +00:00
hkalbasi
4fa8749c44
Preserve order of generic args
2022-03-04 11:46:14 +03:30
Tianyi Song
89a19f57f8
Lower string literals with real val, not default
2022-03-04 10:16:35 +08:00
Lukas Wirth
47ce4436e4
Make hir::Local::name infallible
2022-02-26 16:36:44 +01:00
Jonas Schievink
a247fffdf6
Resolve $crate
in HirDisplay
of Path
2022-02-25 18:38:51 +01:00
Lukas Wirth
7b89d5ede2
internal: Expand the derive attribute into a pseudo expansion
2022-02-22 10:20:40 +01:00
bors[bot]
24255e5b3d
Merge #11481
...
11481: Display parameter names when hovering over a function pointer r=Veykril a=Vannevelj
Implements #11474
The idea is pretty straightforward: previously we constructed the hover based on just the parameter types, now we pass in the parameter names as well. I went for a quick-hit approach here but I expect someone will be able to point me to a better way of resolving the identifier.
I haven't figured out yet how to actually run my rust-analyzer locally so I can see it in action but the unit test indicates it should work.
Co-authored-by: Jeroen Vannevel <jer_vannevel@outlook.com>
2022-02-21 13:08:31 +00:00