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
Jonas Platte
b8f4667aa9
Always put a space after dyn
in macro pretty-printing
...
… regardless of whether the next symbol is punctuation or not.
Fixes issue 11100.
2022-01-05 18:06:50 +01:00
Lukas Wirth
c5a9985fc5
Remove lossy Definition::from_token
/Definition::from_node
methods
2022-01-04 18:29:53 +01:00
Lukas Wirth
19f1ff5c70
give resolve_derive_ident
a more robust api
2022-01-03 16:00:45 +01:00
Lukas Wirth
6b7b09d329
internal: Record unresolved derive invocations in hir
2022-01-02 23:44:23 +01:00
Lukas Wirth
19d894cdec
minor: Cleanup syntax highlighting
2022-01-02 22:23:05 +01:00
Lukas Wirth
22160c418b
fix NameRefClass misclassifying proc-macros
2022-01-02 19:20:10 +01:00
Ariel Davis
d4262f4af8
Migrate to SyntaxNodePtr in new rowan
2021-12-29 23:48:53 -08:00
Aleksey Kladov
bfc263f1f9
introduce hacks module
2021-12-28 18:57:13 +03:00
Aleksey Kladov
621ba1c2d3
import style
2021-12-28 13:52:40 +03:00
Lukas Wirth
5360c9bd22
fix: Do not complete Drop::drop
, complete std::mem::drop
instead
2021-12-22 02:25:38 +01:00
bors[bot]
d3aa2579cc
Merge #11069
...
11069: fix: Partially fix `ide_db::search` for crate roots r=Veykril a=Veykril
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/10007
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-12-20 16:50:35 +00:00
Lukas Wirth
5206946674
fix: Partially fix ide_db::search
for crate roots
2021-12-20 17:48:47 +01:00
Lukas Wirth
a574434c3f
Simplify NameClass::classify
2021-12-20 13:47:06 +01:00
bors[bot]
81d0096000
Merge #11035
...
11035: Include clippy lint groups in autocomplete r=Veykril a=k-nasa
## Why
close: https://github.com/rust-analyzer/rust-analyzer/issues/11027
## Proof
I confirmed that complement candidates are coming out.
https://user-images.githubusercontent.com/23740172/146465758-bc7d5cdd-e2fb-48d6-abf7-804ba859c9b1.mov
Co-authored-by: k-nasa <htilcs1115@gmail.com>
2021-12-18 17:59:29 +00:00
Aleksey Kladov
a022ad68c9
internal: move all the lexing to the parser crate
2021-12-18 17:20:38 +03:00
k-nasa
0e9095e42c
manual run sourcegen_lint_completions
2021-12-17 08:46:17 +09:00
k-nasa
4e6e65dd71
List struct to clonable
2021-12-17 08:33:46 +09:00
Lukas Wirth
901c7c7277
match_ast!
takes a pattern to allow underscore usage
2021-12-14 12:44:31 +01:00
Lukas Wirth
9915103c9e
Simplify
2021-12-14 12:38:20 +01:00
bors[bot]
3f550d2e38
Merge #11000
...
11000: fix: insert whitespaces into assoc items for assist when macro generated r=Veykril a=Veykril
This is obviously only a temporary hack which still produces ugly looking items, but as long as the syntax is valid one can at least have rustfmt fix the formatting again.
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/6588
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-12-13 15:43:12 +00: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
bors[bot]
48cd733c9e
Merge #10956 #10986
...
10956: minor: Bump deps r=Veykril a=lnicola
bors r+
10986: fix: Fix lint completions not working for unclosed attributes r=Veykril a=Veykril
Fixes #10682
Uses keywords and nested `TokenTree`s as a heuristic to figure out when to stop parsing in case the attribute is unclosed which should work pretty well as attributes are usually followed by either of those.
bors r+
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-12-11 14:58:07 +00:00
Lukas Wirth
0001a42570
fix: Fix lint completions not working for unclosed attributes
2021-12-11 15:55:25 +01:00
bors[bot]
3137327182
Merge #10985
...
10985: minor: Remove unnecessary clones r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-12-11 14:32:29 +00:00
Lukas Wirth
03f6d92ae4
minor: Remove unnecessary clones
2021-12-11 15:27:36 +01:00
bors[bot]
d97f2f6b9b
Merge #10976
...
10976: fix: Show case-insensitive exact matches instead of fuzzy flyimport for short paths r=Veykril a=Veykril
And raise the fuzzy trigger from 2 to 3 chars. This way we keep the ability of flyimporting short names like `Rc`.
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/6917
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-12-11 13:50:55 +00:00
Lukas Wirth
143a30aa51
Show case-insensitive exact matches instead of fuzzy flyimport for short paths
2021-12-11 14:47:11 +01:00
Lukas Wirth
c81aa68afe
Don't show trait flyimports for impl trait and placeholders
2021-12-10 19:18:21 +01:00
Jonas Schievink
b365b6119c
Treat extern blocks as item containers
2021-12-07 17:31:26 +01:00
Lukas Wirth
e09d410dcd
Simplify
2021-12-07 15:06:56 +01:00
Lukas Wirth
e4f2d0e3a8
Introduce SymbolKind::Derive
2021-12-04 18:18:09 +01:00
Lukas Wirth
642c1eb720
Introduce SymbolKind::Attribute
2021-12-04 18:01:22 +01:00
Lukas Wirth
d174158abc
Rename things: Tool -> ToolModule
2021-12-03 17:15:19 +01:00
Lukas Wirth
d1677f3286
Remove syntax highlighting hack for builtin attrs
2021-12-03 16:54:34 +01:00
Lukas Wirth
e58af219a4
feat: Resolve builtin-attr and tools in ide layer
2021-12-03 16:32:17 +01:00
Jake Heinz
f4bf750016
simpler way of grabbing module / trait name
2021-11-30 08:24:07 +00:00
Jake Heinz
b0c7ff39b8
remove one need for semantics
2021-11-30 04:50:09 +00:00
Jake Heinz
54fc98920b
consts with inners??
2021-11-30 03:21:17 +00:00
Jake Heinz
492b169224
pr feedbacks
2021-11-30 03:09:38 +00:00
Jake Heinz
0abf236445
test the one thing this pr was trying to accomplish lol...
2021-11-29 10:43:51 +00:00
Jake Heinz
f0bfe310a2
add a test
2021-11-29 10:36:22 +00:00
Jake Heinz
97105e1288
some more cleanups
2021-11-29 09:52:03 +00:00
Jake Heinz
1280887561
do something with library_symbols
2021-11-29 09:36:00 +00:00
Jake Heinz
176f4da77a
simplify work
2021-11-29 07:17:18 +00:00
Jake Heinz
6e89fb6f73
🧹
2021-11-29 05:42:46 +00:00
Jake Heinz
6cf9969546
collect macro_rules! macros into macro declarations
2021-11-29 05:28:22 +00:00
Jake Heinz
1ed5699355
collect macros
2021-11-29 05:22:30 +00:00
Jake Heinz
d69e0dab56
cleanup the whole thing...
2021-11-29 03:54:52 +00:00