Lukas Wirth
887dd2d5bb
Document semantic token modifiers
2021-05-26 13:37:54 +02:00
Aramis Razzaghipour
d75277b66b
Refactor application of library
semantic token modifier
2021-05-25 12:20:12 +10:00
Aramis Razzaghipour
eca4b764e4
Remove superfluous early-returns
2021-05-24 14:54:48 +10:00
Aramis Razzaghipour
e51188cd09
Rename ‘foreign’ semantic token modifier to ‘library’
2021-05-24 14:54:48 +10:00
Aramis Razzaghipour
fa0d0bfb7f
Add testing of foreign item highlighting
2021-05-24 14:54:16 +10:00
Aramis Razzaghipour
b4cddc0705
Highlight foreign modules as such
2021-05-24 14:54:16 +10:00
Aramis Razzaghipour
c32428571c
Remove hir krate methods
2021-05-24 14:54:16 +10:00
Aramis Razzaghipour
4fd5248749
Add highlighting of items from other crates
2021-05-24 14:53:48 +10:00
Aramis Razzaghipour
4d4dbcfead
Give ‘unsafe’ semantic token modifier to unsafe traits
2021-05-23 21:45:10 +10:00
bors[bot]
ef6df1d994
Merge #8853
...
8853: Tag Self in impls as a TypeAlias r=matklad a=Veykril
bors r+
Fixes #4398
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-05-16 17:35:40 +00:00
Lukas Wirth
90230e882d
Tag Self in impls as a TypeAlias
2021-05-16 15:12:58 +02:00
bors[bot]
a57bd59f35
Merge #8813
...
8813: Get some more array lengths! r=lf- a=lf-
This is built on #8799 and thus contains its changes. I'll rebase it onto master when that one gets merged. It adds support for r-a understanding the length of:
* `let a: [u8; 2] = ...`
* `let a = b"aaa"`
* `let a = [0u8; 4]`
I have added support for getting the values of byte strings, which was not previously there. I am least confident in the correctness of this part and it probably needs some more tests, as we currently have only one test that exercised that part (!).
Fixes #2922 .
Co-authored-by: Jade <software@lfcode.ca>
2021-05-16 01:53:12 +00:00
Lukas Wirth
4b5b54279a
Attach comments to ast::Impl
2021-05-15 17:32:28 +02:00
hi-rustin
765ccf2eca
Address comments
2021-05-14 17:47:16 +08:00
hi-rustin
b98c119ba6
Apply async semantic token modifier to async/await keywords
...
Only async semantic token modifier
2021-05-14 10:47:00 +08:00
Jade
73023c0299
Support length for ByteStrings
...
I am not confident that my added byte string parsing is right.
2021-05-12 21:22:46 -07:00
Lukas Tobias Wirth
5a78d96d0e
Fix block comment intra doc link injection ranges
2021-05-04 13:51:57 +02:00
Bastian Kersting
421cf9a1bd
Fixed formatting
2021-04-26 11:37:28 +02:00
Bastian Kersting
336b81abd7
Added mutable semantic token modifier for &mut self methods
2021-04-26 09:24:18 +02:00
Lukas Wirth
1e88f5ec8e
Simplify highlight token match guards
2021-04-23 17:27:18 +02:00
Lukas Wirth
ef6f596b4b
Sort HlMod variants and ALL const
2021-04-23 17:24:58 +02:00
Lukas Wirth
c005ce60a0
Tag yield
and await
as ControlFlow in semantic highlighting
2021-04-23 17:24:45 +02:00
Adrian Stanciu
1c75d8975c
Fix typo: comparision -> comparison
2021-04-19 18:44:38 +03:00
Lukas Wirth
2f62c0117a
Check for rust doc code attributes like rustdoc does
2021-04-19 13:32:52 +02:00
Lukas Wirth
8a959497b1
Don't require all doc fences to be valid for identifying rust code
2021-04-19 11:41:45 +02:00
Chayim Refael Friedman
6c287e1504
Accept E<error_number>
notation in doctests
...
```compile_fail,E0000
```
The code was stolen from rustdoc at 392ba2ba1a/src/librustdoc/html/markdown.rs (L866-L867)
2021-04-18 06:15:40 +03:00
bors[bot]
03e0bf7f55
Merge #8354
...
8354: Distinguishing between different operators in semantic highlighting r=matklad a=chetankhilosiya
Co-authored-by: Chetan Khilosiya <chetan.khilosiya@gmail.com>
2021-04-13 11:46:23 +00:00
Aleksey Kladov
327323ad25
internal: fix flakiness of accidentally quadratic test
2021-04-13 12:56:24 +03:00
Jakub Kądziołka
2f60cec3ac
Fix typo: liner -> linear
...
🙈
2021-04-12 20:20:25 +02:00
Aleksey Kladov
e012efca27
Let's try testing for "is not quadratic" condition
2021-04-10 12:43:07 +03:00
Chetan Khilosiya
4a9dd149aa
8024: Added the trait modifier for assoc types.
2021-04-09 01:00:35 +05:30
Chetan Khilosiya
b232549653
8279: Fix the not operator use and test case fix.
2021-04-08 22:58:26 +05:30
Chetan Khilosiya
1735b3ef6a
8279: Added initial implementation for
...
Operator semantic highlighting.
2021-04-08 22:58:26 +05:30
bors[bot]
c2be91dcd8
Merge #8245
...
8245: Properly resolve intra doc links in hover and goto_definition r=matklad a=Veykril
Unfortunately involves a bit of weird workarounds due to pulldown_cmark's incorrect lifetimes on `BrokenLinkCallback`... I should probably open an issue there asking for the fixes to be pushed to a release since they already exist in the repo for quite some time it seems.
Fixes #8258 , Fixes #8238
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-04-05 12:30:20 +00:00
Chetan Khilosiya
518c9c7548
Revert "8024: Added test case for highlighting trait items."
...
This reverts commit d7dcd41801
.
2021-03-31 01:46:01 +05:30
Chetan Khilosiya
d0fcd5c5e0
8024: Fix for function name change.
2021-03-31 00:47:37 +05:30
Chetan Khilosiya
d7dcd41801
8024: Added test case for highlighting trait items.
2021-03-31 00:31:15 +05:30
Chetan Khilosiya
56f624532a
8024: Updated the implementation for trait modifier.
...
Fixed the test cases.
2021-03-31 00:31:15 +05:30
Chetan Khilosiya
f269fe7156
8024: Added the trait modifier for methods
...
method in impls and method calls will have trait modifier.
2021-03-31 00:31:15 +05:30
Lukas Wirth
bb56b7a75c
Use new new docs string source mapping in goto_def and hover
2021-03-30 18:27:16 +02:00
Lukas Wirth
9a327311e4
Implement basic Documentation source to syntax range mapping
2021-03-30 17:20:43 +02:00
Lukas Wirth
6b8358d4d9
Remove code duplication in highlight injection
2021-03-29 20:11:28 +02:00
Edwin Cheng
4520002b63
Unleash macro 2.0 in hightlight and more
2021-03-27 14:42:49 +08:00
cynecx
5ff3299dd6
syntax: return owned string instead of leaking string
2021-03-26 18:30:59 +01:00
Lukas Wirth
8b0d0bd9c7
Show item info when hovering intra doc links
2021-03-23 19:57:04 +01:00
Lukas Wirth
38048c35d8
Don't use an untyped String for ActiveParam tracking
2021-03-20 23:22:09 +01:00
Jonas Schievink
636de3c709
Add AttrsWithOwner
and clean up source_map
2021-03-19 21:23:57 +01:00
Jonas Schievink
fc5f73de45
Move AttrsOwnerNode
to syntax and make it public
2021-03-19 20:05:17 +01:00
bors[bot]
7200b994c9
Merge #8097
...
8097: Parse extended_key_value_attributes r=jonas-schievink a=Veykril
Companion PR https://github.com/rust-analyzer/ungrammar/pull/31
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-03-19 11:38:40 +00:00
Lukas Wirth
4771a56791
Parse extended_key_value_attributes
2021-03-19 02:13:46 +01:00