Lukas Wirth
c37fe779c6
Add data queries for macros
2022-03-09 00:41:54 +01:00
Lukas Wirth
ab21cf2f4f
internal: Re-arrange ide_db modules
2022-03-06 19:04:04 +01:00
Lukas Wirth
2e124d15fb
fix: Fix expand_macro always expanding the first listed derive
2022-02-22 12:32:27 +01:00
Lukas Wirth
f13c98034b
Make replace_derive_with_manual_impl work again
2022-02-22 10:20:44 +01:00
Lukas Wirth
be3168dabe
Fix expand_macro
not working for derive attributes
2022-02-22 10:20:44 +01:00
Laurențiu Nicola
e14d9208f5
Move pretty-printing test out of assist
2022-01-06 16:38:25 +02:00
Jonas Platte
c90c88b083
Always put a space after impl in macro pretty-printing
...
… regardless of whether the next symbol is punctuation or not.
2022-01-06 11:33:08 +01:00
Lukas Wirth
749eeef3e7
fix: insert whitespaces into assoc items for assist when macro generated
2021-12-13 16:35:32 +01:00
Lukas Wirth
328419534d
Move ws insert rendering for macro expansion into ide_db
2021-12-13 15:55:13 +01:00
Jake Heinz
dca8f612d0
ide: fix expansion for 'as _'
2021-11-27 02:22:21 +00:00
Lukas Wirth
91bbc55eed
Check for derive attributes by item path, not derive
identifier
2021-11-17 20:46:57 +01:00
Anatol Ulrich
b42093915a
Update crates/ide/src/expand_macro.rs
...
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-10-26 20:17:47 +02:00
Anatol Ulrich
e6913be47b
fix test
2021-10-26 20:15:25 +02:00
Anatol Ulrich
04f2eb0fba
wording
2021-10-26 20:10:09 +02:00
Anatol Ulrich
3f82989153
fix: make expand_macro
multi-token mapping aware
2021-10-26 20:09:14 +02:00
Mirko Rainer
eccfa1645b
Saw a FIXME comment and decided to fix it.
...
This renames `descend_into_macros` to `descend_into_macros_single` and `descend_into_macros_many` into `descend_into_macros`.
However, this does not touch a function in `SemanticsImpl` of same name.
2021-10-12 11:52:31 -04:00
nathan.whitaker
a3661b3900
Add whitespace b/w lifetime and mut in expansion
2021-10-01 15:29:26 -04:00
Lukas Wirth
538ac599d2
Add some more attribute ide tests
2021-09-14 03:57:29 +02:00
Lukas Wirth
0f3617f76f
fix: Fix multiple derives in one attribute not expanding all in expand_macro
2021-08-26 03:32:45 +02:00
Lukas Wirth
3f9f63c1bd
Improve expand_macro
2021-08-26 02:36:33 +02:00
Lukas Wirth
d99b81f839
Expand derive macros under cursor in Expand Macro Recursively
2021-08-24 16:33:52 +02:00
Lukas Wirth
2f179adc41
Expand attributes recursively in expand_macro
2021-08-21 23:24:12 +02:00
Lukas Wirth
f615efdfc3
Factor out pick_best_token
ide pattern into ide_db
2021-06-22 17:50:15 +02:00
Lukas Wirth
b423c61ce6
Prefer identifier tokens in expand_macro
2021-06-22 12:03:51 +02:00
Jonas Schievink
fcf22d68d4
Prefer attr macros in "expand macro recursively"
2021-06-08 22:26:01 +02:00
Jonas Schievink
33e747d786
Make "expand macro" command work with attribute macros
2021-06-07 16:05:36 +02:00
Lukas Wirth
841feef79e
Allow expand-macro to be invoked anywhere inside a macro call
2021-06-02 21:42:49 +02:00
Lukas Wirth
952fc23694
Replace SyntaxRewriter with ted in exppand_macro::expand_macro_recur
2021-04-19 19:43:26 +02:00
Laurențiu Nicola
48b946bde1
Reduce allocations in Expand macro
2021-04-08 17:37:43 +03:00
Emmanuel Thompson
35bec31bca
Add space after lifetime
...
In macro expansion, this lead to invalid syntax
2021-04-06 23:22:44 -04:00
Ayomide Bamidele
276022682b
Gifs and screenshots for features in manual
2021-03-31 00:08:10 +01:00
Kevaundray Wedderburn
72b9a4fbd3
Change <|> to $0 - Rebase
2021-01-07 12:09:23 +00:00
Aleksey Kladov
b06259673f
rename mock_analysis -> fixture
2020-10-02 17:49:44 +02:00
Aleksey Kladov
b0fd3faf36
Switch to expect_test from crates.io
2020-08-21 13:19:31 +02:00
Aleksey Kladov
1b0c7701cc
Rename ra_ide -> ide
2020-08-13 17:58:27 +02:00