Commit Graph

10985 Commits

Author SHA1 Message Date
bors[bot]
aa30929192 Merge #99
99: Dynamically apply highlightingOn config r=matklad a=aochagavia

Fixes #84

Co-authored-by: Adolfo Ochagavía <aochagavia92@gmail.com>
2018-10-07 08:26:13 +00:00
Adolfo Ochagavía
9ccc568601 Dynamically apply highlightingOn config
Fixes #84
2018-10-06 22:53:12 +02:00
Jeremy A. Kolb
ff1b2da502 Remove functional noop 2018-10-06 13:41:33 -04:00
Jeremy A. Kolb
828bd73195 Resolve local names first 2018-10-06 12:02:15 -04:00
Jeremy A. Kolb
1d4c767879 WIP: This doesn't currently work but I also don't think it's the right abstraction 2018-10-05 15:21:40 -04:00
Jeremy A. Kolb
91312a9ff9 Add resolve_local_name to resolve names in a function scope 2018-10-05 10:53:17 -04:00
Daniel McNab
fce76cc79a Reformat CONTRIBUTING.md
This uses:
`prettier --prose-wrap always ./CONTRIBUTING.md --write`
2018-10-04 21:45:39 +01:00
Daniel McNab
80eefcbc05 Add cargo gen-kinds documentation 2018-10-04 21:43:58 +01:00
bors[bot]
81bf190f7a Merge #94
94: Extend comments by single word first r=matklad a=kjeremy

Fixes #88

Co-authored-by: Jeremy A. Kolb <jkolb@ara.com>
2018-10-04 14:25:53 +00:00
Jeremy A. Kolb
a30039ba62 Pull casts out of TextUnit 2018-10-04 09:39:02 -04:00
Jeremy A. Kolb
334d266b77 Simplify extend_single_word_in_comment 2018-10-04 09:35:55 -04:00
bors[bot]
7a025ad201 Merge #93
93: Support leading pipe in match arms r=matklad a=DJMcNab

This adds support for match arms of the form:
```rust
<...>
| X | Y => <...>,
| X => <...>,
| 1..2 => <...>,
etc
```

# Implementation discussion

This just naïvely 'eats' a leading pipe if one is available. The equivalent line in the reference `libsyntax` is in [`parse_arm`](441519536c/src/libsyntax/parse/parser.rs (L3552)).

As noted in the comment linked above, this feature was formally introduced as a result of rust-lang/rfcs#1925. This feature is in active use in the [`rust-analyzer` codebase](c87fcb4ea5/crates/ra_syntax/src/syntax_kinds/generated.rs (L231))

I have added some tests for this feature, but maybe more would be required

EDIT: Always looking for feedback - is this PR description over-engineered?

Co-authored-by: Daniel McNab <36049421+djmcnab@users.noreply.github.com>
2018-10-04 07:02:19 +00:00
Jeremy A. Kolb
4c2be06a7e Extend comments by single word first
Fixes #88
2018-10-03 17:04:00 -04:00
Daniel McNab
a55ef9b3ed Support leading pipe in match arms 2018-10-03 21:47:03 +01:00
bors[bot]
c87fcb4ea5 Merge #92
92: cargo update r=matklad a=kjeremy



Co-authored-by: Jeremy A. Kolb <jkolb@ara.com>
2018-10-02 17:26:34 +00:00
Jeremy A. Kolb
59af391f09 cargo update 2018-10-02 13:25:04 -04:00
Aleksey Kladov
4103068ad2
Merge pull request #91 from kjeremy/ignore-idea
Ignore .idea/
2018-10-02 18:18:26 +01:00
Jeremy A. Kolb
07194208c3 Ignore .idea/ 2018-10-02 13:15:31 -04:00
bors[bot]
248ee0c3fe Merge #90
90: Inherent traversal r=matklad a=matklad

bors r+

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2018-10-02 15:51:39 +00:00
Aleksey Kladov
1a2a8dec14 Make siblings an inherent method 2018-10-02 18:14:33 +03:00
Aleksey Kladov
d323c81d5c make ancestors and descendants inherent 2018-10-02 18:02:57 +03:00
Aleksey Kladov
dccaa5e45e use aliases 2018-10-02 17:50:56 +03:00
bors[bot]
7ffc114dab Merge #85
85: start moving syntax tree to a separate crate r=matklad a=matklad

WIP

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2018-10-02 14:14:56 +00:00
Aleksey Kladov
a261a1836b Move to rowan for syntax tree impl 2018-10-02 17:09:23 +03:00
bors[bot]
cd9c5f4ab2 Merge #83
83: Add a setting to disable custom syntax highlighting r=matklad a=aochagavia



Co-authored-by: Adolfo Ochagavía <aochagavia92@gmail.com>
2018-09-29 19:39:11 +00:00
Adolfo Ochagavía
26108dde1c Add a setting to disable custom syntax highlighting 2018-09-29 21:27:41 +02:00
Aleksey Kladov
804e29402a fix code actions 2018-09-29 21:59:34 +03:00
Aleksey Kladov
baaf027da0 support 2018 paths 2018-09-29 14:53:23 +03:00
bors[bot]
5e1d109cbb Merge #81
81: [WIP] Reject impl keyword inside impl header r=matklad a=csmoe

Closes #77 

Co-authored-by: csmoe <35686186+csmoe@users.noreply.github.com>
2018-09-26 20:14:28 +00:00
csmoe
8b710e9535 generate testsuite for impl_type 2018-09-26 16:53:16 +08:00
csmoe
edf1cc3582 parse impl type 2018-09-25 22:21:16 +08:00
bors[bot]
7eb047a105 Merge #79
79: Implement Folding Ranges r=matklad a=kjeremy

Implements folding ranges for comments and imports.

Bumps LSP to 3.13

Co-authored-by: Jeremy A. Kolb <jkolb@ara.com>
2018-09-25 11:43:48 +00:00
Jeremy A. Kolb
4d52d004d5 Unit Tests 2018-09-24 10:48:13 -04:00
Jeremy A. Kolb
ff0a706a30 Split folding ranges into editor and lsp parts 2018-09-24 09:52:33 -04:00
csmoe
cacb32d88a reject impl keyword in impl header 2018-09-24 11:44:43 +08:00
csmoe
e446316585 add test for impl recovery 2018-09-24 11:44:43 +08:00
Jeremy A. Kolb
bd2b2f1b48 Implement folding ranges 2018-09-23 11:19:36 -04:00
Jeremy A. Kolb
e293a16d6b Support LSP 3.13 2018-09-23 11:10:57 -04:00
bors[bot]
c2ab6ad73d Merge #78
78: Remove undefined command in code/package.json r=matklad a=ekrctb



Co-authored-by: ekrctb <ekrctb@gmail.com>
2018-09-21 13:31:27 +00:00
ekrctb
c698446384 Remove undefined command 2018-09-21 22:20:48 +09:00
Aleksey Kladov
885162d713 Use more neutral language in the README 2018-09-21 14:16:48 +03:00
bors[bot]
f5808b21a4 Merge #75
75: libsyntax2 -> rust-analyzer r=matklad a=kjeremy

Change a few `libsyntax2` to `rust-analyzer`

Co-authored-by: Jeremy A. Kolb <jkolb@ara.com>
2018-09-19 10:56:31 +00:00
Aleksey Kladov
4d5cfd7229 prefer lifetimes in extend selection 2018-09-19 13:55:47 +03:00
Aleksey Kladov
5901e98116 cleanup comment 2018-09-19 01:15:52 +03:00
Aleksey Kladov
c6cdd649e5 commit lock 2018-09-19 01:10:19 +03:00
Aleksey Kladov
d6c7030aeb Add emacs function for extend shirnk selection 2018-09-19 00:46:10 +03:00
Jeremy A. Kolb
8845b50438 libsyntax2 -> rust-analyzer 2018-09-18 17:40:33 -04:00
Aleksey Kladov
79293d2593 eprintln 2018-09-16 17:24:18 +03:00
Aleksey Kladov
bb2331b98e goto super places cursor on mod 2018-09-16 16:25:24 +03:00
Aleksey Kladov
b5cb53ea93 tweak readme 2018-09-16 15:36:09 +03:00