Commit Graph

4709 Commits

Author SHA1 Message Date
bors[bot]
e614356de1
Merge #2827
2827: Fix array element attribute position r=matklad a=edwin0cheng

This PR fixed a bug which an ATTR node insert in the wrong place in array element. ~~And introduce `precede_next` for allow outer attributes to insert into a parsed `expr`.~~  

related #2783

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
2020-01-16 15:49:23 +00:00
Edwin Cheng
a766883a75 fix formating 2020-01-16 23:48:03 +08:00
Edwin Cheng
ed8d5c86e3 Fix array element attribute position 2020-01-16 23:37:43 +08:00
Aleksey Kladov
272f6dfd9e Micro-optimize type hints to avoid allocations 2020-01-16 14:31:34 +01:00
Aleksey Kladov
bd96d0b258 Minimize visibility 2020-01-16 11:58:31 +01:00
bors[bot]
c78d269b66
Merge #2837
2837: Accidentally quadratic r=matklad a=matklad

Our syntax highlighting is accdentally quadratic. Current state of the PR fixes it in a pretty crude way, looks like for the proper fix we need to redo how source-analyzer works. 

**NB:** don't be scared by diff stats, that's mostly a test-data file

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-01-15 19:38:10 +00:00
Kirill Bulatov
79b77403b6 Reduce visibility 2020-01-15 20:21:05 +02:00
Kirill Bulatov
d51cf7794d itertools::Either -> either::Either 2020-01-15 20:20:20 +02:00
Kirill Bulatov
78a21253b4 Apply the api design suggestions 2020-01-15 20:17:17 +02:00
Kirill Bulatov
73dc8b6f06 Another attempt to add multiple edits 2020-01-15 20:16:27 +02:00
Aleksey Kladov
ef1326ee19 More orthogonal path editing 2020-01-15 18:48:28 +01:00
Aleksey Kladov
7d2d3ac3db More fluent API 2020-01-15 18:30:23 +01:00
Aleksey Kladov
c84010e246 Slightly more fluent API 2020-01-15 18:14:49 +01:00
Aleksey Kladov
8296d3208d Simplify 2020-01-15 18:01:05 +01:00
Aleksey Kladov
448575aa4a Simplify 2020-01-15 18:01:05 +01:00
Aleksey Kladov
263401bf75 Rename 2020-01-15 17:44:12 +01:00
Aleksey Kladov
aaef88db0e Typos 2020-01-15 16:53:01 +01:00
Aleksey Kladov
5b255b4e6b ⬆️ once_cell 2020-01-15 16:52:28 +01:00
Aleksey Kladov
787d1aba63 Add comment 2020-01-15 16:52:28 +01:00
Aleksey Kladov
4194e5c88c Optimize inlay hints 2020-01-15 16:52:28 +01:00
Aleksey Kladov
11d6b9dadd Only new-style classification 2020-01-15 16:52:28 +01:00
Aleksey Kladov
35bfeaf4af Add a test 2020-01-15 16:52:28 +01:00
Aleksey Kladov
c640c2ea11 Make syntax highlighting linear 2020-01-15 16:52:28 +01:00
Aleksey Kladov
7e70fc22a7 Flip generics 2020-01-15 16:52:28 +01:00
Aleksey Kladov
a71bb70f0a Store DB in SourceBinder 2020-01-15 16:52:28 +01:00
Aleksey Kladov
ccfe53376a Introduce SourceBinder 2020-01-15 16:52:28 +01:00
Emil Lauridsen
7a8c6351bf Extract check task handling into function 2020-01-15 16:33:58 +01:00
Emil Lauridsen
ade657cb66 Tweak naming slightly 2020-01-15 15:53:08 +01:00
Emil Lauridsen
478ba65f8d Manage check state updates in main_loop to reduce lock contention 2020-01-15 15:50:49 +01:00
Aleksey Kladov
21ea62d292 Don't parse child modules when doing diagnostics 2020-01-15 14:42:57 +01:00
Jeremy Kolb
e1688be1bb lsp-types 0.69.0
Stabilizes most proposed features
2020-01-15 08:05:42 -05:00
bors[bot]
876f92d547
Merge #2843
2843: Add inlay parameter name hints for call expr r=matklad a=imtsuki

This patch adds Intellij-like parameter name hints for literal values in function calls.

<img width="624" alt="Screenshot" src="https://user-images.githubusercontent.com/8423594/72366533-68d7f800-3735-11ea-9279-cf193ca8ca2f.png">

Signed-off-by: imtsuki <me@qjx.app>

Co-authored-by: imtsuki <me@qjx.app>
2020-01-15 10:24:51 +00:00
imtsuki
d854ad8f27 FnSignature: use unwrap_or_default for parameter_name_list
Signed-off-by: imtsuki <me@qjx.app>
2020-01-15 09:30:19 +08:00
kjeremy
e89ade3809 Cleanup assert 2020-01-14 13:55:32 -05:00
bors[bot]
b2ed130ffd
Merge #2841
2841: More UI friendly labels r=kjeremy a=kjeremy



Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
2020-01-14 18:16:11 +00:00
Jeremy Kolb
864434137a unwrap 2020-01-14 13:15:41 -05:00
bors[bot]
767ff2c13c
Merge #2844
2844: Use dummy value for line! and column! macro r=matklad a=edwin0cheng

Use dummy value `0` for line! and column! macro. 

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
2020-01-14 17:59:24 +00:00
bors[bot]
6a5100f4d5
Merge #2834
2834: refactor(ra_syntax.validation): removed code duplication from validate_literal() r=kiljacken a=Veetaha

Hi! This is my first ever contribution to this project.
I've taken some dirty job from issue #223

This is a simple atomic PR to remove code duplication according to FIXME comment in the function that is the main focus of the further development.

I just didn't want to mix refactoring with the implementation of new features...

I am not sure whether you prefer such atomic PRs here or you'd rather have a single PR that contains all atomic commits inside of it?

So if you want me to add all that validation in one PR I'll mark this one as WIP and update it when the work is finished, otherwise, I'll go with the option of creating separate PRs per each feature of validation of strings, numbers, and comments respectively.

### Comments about refactoring
Yeah, reducing the duplication is quite hard here, extracting into stateless functions could be another option but the number of their arguments would be very big and repeated across char and string implementations so that just writing their types and names would become cumbersome.
I tried the option of having everything captured implicitly in the closure but failed since rust doesn't have templated (or generic) closures as C++ does, this is needed because `unescape_byte*()` and `unescape_char|str()` have different return types...
Maybe I am missing something here? I may be wrong because I am not enough experienced in Rust...
Well, I am awaiting any kind of feedback!

Co-authored-by: Veetaha <gerzoh1@gmail.com>
2020-01-14 17:49:18 +00:00
Edwin Cheng
6ebb1edf21 Use dummy value for line! and column! macro 2020-01-15 01:47:01 +08:00
Jeremy Kolb
9042bb7892 Assert that first letter is capitalized 2020-01-14 12:32:46 -05:00
Jeremy Kolb
e04661e495 Fix casing 2020-01-14 12:32:26 -05:00
imtsuki
d78a3cb638 Update test snapshot
Signed-off-by: imtsuki <me@qjx.app>
2020-01-15 01:32:03 +08:00
imtsuki
c390e92fdd Add inlay parameter name hints for function calls
Signed-off-by: imtsuki <me@qjx.app>
2020-01-15 01:18:52 +08:00
Jeremy Kolb
4cb82c334d More UI friendly labels 2020-01-14 11:49:14 -05:00
bors[bot]
e406f2bed6
Merge #2839
2839: Tweak add_custom_impl r=matklad a=kjeremy

Display a nicer label and categorize

Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
2020-01-14 14:27:58 +00:00
Jeremy Kolb
325912f01e Tweak add_custom_impl 2020-01-14 09:08:45 -05:00
Aleksey Kladov
a38540771f Move Type API to type 2020-01-14 14:42:52 +01:00
Aleksey Kladov
21c5fd8b1b Push resolver further up 2020-01-14 14:24:03 +01:00
Aleksey Kladov
7ec62ea5e6 Push resolver up 2020-01-14 14:11:07 +01:00
Aleksey Kladov
52e7f67128 Move impls_future to Type, where it belongs 2020-01-14 11:29:43 +01:00