bors[bot]
83a651b123
Merge #6154
...
6154: Shorten type hints for std::iter Iterators r=SomeoneToIgnore a=Veykril
Fixes #3750 .
This re-exports the `hir_expand::name::known` module to be able to fetch the `Iterator` and `iter` names.
I'm not sure if there is anything to do with `Solution::Ambig` in `normalize_trait_assoc_type` or whether discarding those results is always wanted.
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2020-10-07 11:52:05 +00:00
Lukas Wirth
783af171f7
Clean up inlay_hints
2020-10-07 13:18:12 +02:00
Lukas Wirth
e106857e80
Shorten iterator hints for std::iter iterators behind references
2020-10-07 12:14:08 +02:00
Lukas Wirth
209e9b9926
Shorten iterator chain hints
2020-10-07 11:30:42 +02:00
Lukas Wirth
c133651e0a
Move IntoIterator into FamousDefs
2020-10-07 10:14:42 +02:00
Lukas Wirth
c6f1de6ac5
Use FamousDefs for shorten_iterator hint
2020-10-06 21:25:39 +02:00
bors[bot]
bf1043cac2
Merge #6128
...
6128: Trim all trailing whitespace in onEnter r=matklad a=repnop
Fixes #5848
Co-authored-by: Wesley Norris <repnop@outlook.com>
2020-10-06 18:17:49 +00:00
bors[bot]
57735f2a32
Merge #6140
...
6140: honour hover.content_format client capability r=lnicola a=robinvd
This removes all markdown when the client does not support the markdown MarkupKind.
Otherwise the output on the editor will have some markdown boilerplate, making it less readable.
For example kak_lsp does not currently support markdown.
![image](https://user-images.githubusercontent.com/22073483/95112949-ef0ff080-0741-11eb-82a7-0594fa2cd736.png )
after:
![image](https://user-images.githubusercontent.com/22073483/95113089-2bdbe780-0742-11eb-94fa-bcfec6d7347a.png )
Co-authored-by: Robin van Dijk <robin@robinjint.nl>
2020-10-06 17:51:20 +00:00
Lukas Wirth
aaa3905fdd
Shorten type hints for std::iter Iterators
2020-10-06 19:20:42 +02:00
Robin van Dijk
bd7bf4a276
add break after codeblocks
2020-10-06 16:34:38 +02:00
Robin van Dijk
bc890ed5b0
add doc describing limited capabilities
2020-10-06 16:34:26 +02:00
bors[bot]
8bf13292f0
Merge #6148
...
6148: Fix trait object hir formatting behind pointer and references r=matklad a=Veykril
Fixes #6064
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2020-10-06 13:28:03 +00:00
Lukas Wirth
643bbf15a2
Fix trait object hir formatting behind pointer and references
2020-10-06 14:40:27 +02:00
bors[bot]
87cb840a4e
Merge #6124
...
6124: Better normalized crate name usage r=jonas-schievink a=SomeoneToIgnore
Closes https://github.com/rust-analyzer/rust-analyzer/issues/5343
Closes https://github.com/rust-analyzer/rust-analyzer/issues/5932
Uses normalized name for code snippets (to be able to test the fix), hover messages and documentation rewrite links (are there any tests for those?).
Also renamed the field to better resemble the semantics.
Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
2020-10-06 11:51:15 +00:00
bors[bot]
44587d1bfc
Merge #6127
...
6127: Correctly complete items with leading underscore r=SomeoneToIgnore a=fmease
Fixes #6091 . Let me know if the test is placed into the right file or if it is even desired.
Co-authored-by: León Orell Valerian Liehr <liehr.exchange@gmx.net>
2020-10-05 21:27:18 +00:00
Aleksey Kladov
bff812ddfe
Fix feature name
2020-10-05 20:25:11 +02:00
Robin van Dijk
81f61afa9f
add docstring
2020-10-05 20:06:25 +02:00
Robin van Dijk
c3cc361294
honor content_format clientcap
...
This removes all markdown when the client does not support the markdown MarkupKind
Otherwise the output on the editor will have some markdown boilerplate, making it less readable
2020-10-05 19:27:29 +02:00
Wesley Norris
adb3c56ff0
Trim all trailing whitespace in onEnter
...
Fixes #5848
2020-10-03 14:17:21 -04:00
Igor Aleksanov
3cadba4956
Improve readability in inlay_hints.rs
2020-10-03 13:44:43 +03:00
Igor Aleksanov
91a09f50f4
Remove 'for_expr' test from inlay_hints.rs
2020-10-03 08:58:17 +03:00
Igor Aleksanov
a58441ad1b
Make the tests for complete/incomplete for inlay hints work
2020-10-03 08:37:58 +03:00
Igor Aleksanov
8ca214fbfb
Better inlay hints in 'for' loops
2020-10-03 08:30:25 +03:00
León Orell Valerian Liehr
32864e3b49
Correctly complete items with leading underscore
2020-10-03 03:00:09 +02:00
Kirill Bulatov
9d19e5b962
Properly name the field
2020-10-02 21:38:22 +03:00
Kirill Bulatov
cae2e859ff
Add a dash test
2020-10-02 20:59:32 +03:00
Aleksey Kladov
b06259673f
rename mock_analysis -> fixture
2020-10-02 17:49:44 +02:00
Aleksey Kladov
09348b2474
Get rid of MockAnalysis
2020-10-02 17:31:20 +02:00
Aleksey Kladov
8716c4cec3
Move ide::AnalysisChange -> base_db::Change
...
This seems like a better factoring logically; ideally, clients shouldn't touch
`set_` methods of the database directly. Additionally, I think this
should remove the unfortunate duplication in fixture code.
2020-10-02 16:45:08 +02:00
Aleksey Kladov
700c9bc019
Expectify find_references tests
2020-10-02 16:42:48 +02:00
Aleksey Kladov
763b13a74e
Reduce visibiity
2020-10-02 14:26:40 +02:00
Igor Aleksanov
97f2905dec
Use expect_test to make format_str_parser test more data-driven
2020-10-02 14:51:20 +03:00
Igor Aleksanov
76d0546ac7
Use lookup table instead of enum for postfix completion kinds
2020-10-02 13:33:27 +03:00
Igor Aleksanov
b7ac540f15
Use ast::String for extracting string literal contents
2020-10-02 13:23:49 +03:00
Igor Aleksanov
2557cb8518
Improve format-like completions code appearance
2020-10-02 12:49:33 +03:00
Igor Aleksanov
777ccb58f0
Add missing entry to doc-comment
2020-10-02 12:42:39 +03:00
Igor Aleksanov
cd3d654f60
Simplify is_string_literal function
2020-10-02 12:42:39 +03:00
Igor Aleksanov
e447b3a4a2
Improve checks for postfix suggestions
2020-10-02 12:42:39 +03:00
Igor Aleksanov
ea320141c6
Add postfix completion for format-like string literals
2020-10-02 12:42:39 +03:00
kjeremy
82d6cfd495
Minor clippy performance suggestions
2020-09-30 15:22:49 -04:00
Aleksey Kladov
af8063fe37
Extend **Status** command to also show dep info for the file
...
This should help with troubleshooting wrong project configuration
2020-09-29 22:13:23 +02:00
Aleksey Kladov
e7df0ad2fb
Remove periodic gc stub
2020-09-29 21:22:48 +02:00
vsrs
cd5eeb904e
Add tests
2020-09-29 15:29:20 +03:00
vsrs
1895716c88
Do not show references CodeLens for tests.
2020-09-29 15:29:20 +03:00
vsrs
06fbd69050
Make method references CodeLens lazy.
2020-09-29 15:29:20 +03:00
flw
e73ee9dfa2
Add hover config linksInHover
to suppress links
2020-09-29 19:47:18 +08:00
bors[bot]
cfe987bcdf
Merge #6055
...
6055: Add ok postfix completion r=matklad a=mullr
Wrapping values in `Ok(...)` is so pervasive that it seems reasonable for it to
have its own postfix completion.
Co-authored-by: Russell Mull <russell.mull@gmail.com>
2020-09-25 11:55:35 +00:00
bors[bot]
163ffb8803
Merge #6072
...
6072: Cleanup unintended unresolved reference in syntax higlighting test r=matklad a=Nashenas88
Fixes the issue brought up here https://github.com/rust-analyzer/rust-analyzer/pull/5957#discussion_r486625707
cc @jonas-schievink
Co-authored-by: Paul Daniel Faria <Nashenas88@users.noreply.github.com>
2020-09-25 11:49:12 +00:00
Paul Daniel Faria
ed8968af49
Cleanup unintended unresolved reference in syntax higlighting test
2020-09-24 10:14:25 -04:00
bors[bot]
5d137f21f2
Merge #6056
...
6056: Add dbgr postfix completion r=matklad a=lnicola
Expanding to `dbg!(&e)`.
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2020-09-24 14:14:01 +00:00