Commit Graph

8921 Commits

Author SHA1 Message Date
Adolfo Ochagavía
5508c91b3e Remove nesting 2018-10-11 16:45:52 +02:00
Adolfo Ochagavía
f88e13f539 Use Comment wrapper 2018-10-11 16:25:35 +02:00
bors[bot]
9b155c8976 Merge #118
118: Remove error publishing through publishDecorations r=matklad a=aochagavia

The errors are already reported by `publishDiagnostics`

Closes #109 

Co-authored-by: Adolfo Ochagavía <aochagavia92@gmail.com>
2018-10-11 09:18:33 +00:00
bors[bot]
7e55aaeeed Merge #120
120: Cleanup grammar generation r=matklad a=ReinierMaas

31c8ebb743/crates/ra_syntax/src/ast/generated.rs (L207-L210)
Needed an additional newline before the `pub fn`.

Removing `-` for #114.
Runnning `cargo gen-kinds` to update grammar.

Co-authored-by: Reinier Maas <reiniermaas@users.noreply.github.com>
Co-authored-by: Reinier Maas <reiniermaas@hotmail.com>
2018-10-10 15:54:57 +00:00
Reinier Maas
6abecf76e5 Update crates/ra_syntax/src/ast/generated.rs
effect of running cargo gen-kinds
2018-10-10 17:26:01 +02:00
Reinier Maas
c579b47b4a
Update generated.rs.tera
Removing `-` for #114
2018-10-10 17:18:21 +02:00
Adolfo Ochagavía
edd162bda8 Report errors only once 2018-10-10 16:59:46 +02:00
Adolfo Ochagavía
26d34cc443 Remove error publishing through publishDecorations 2018-10-10 16:49:32 +02:00
Adolfo Ochagavía
27a86cb7df Collapse comments upon join 2018-10-10 12:37:06 +02:00
bors[bot]
3c41087bf8 Merge #115
115: Format vscode extension and add npm run fix r=matklad a=aochagavia



Co-authored-by: Adolfo Ochagavía <aochagavia92@gmail.com>
2018-10-09 21:37:31 +00:00
Adolfo Ochagavía
f2d719b24a Format vscode extension and add npm run fix 2018-10-09 22:56:22 +02:00
bors[bot]
31c8ebb743 Merge #106
106: Add on-enter handler r=matklad a=matklad

Now, typing doc comments is much more pleasant

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2018-10-09 16:52:48 +00:00
Aleksey Kladov
2b956fd3a8 Add on-enter handler
Now, typing doc comments is much more pleasant
2018-10-09 19:52:06 +03:00
bors[bot]
14baf11bd4 Merge #111
111: gate on tslint r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2018-10-09 16:36:29 +00:00
Aleksey Kladov
f4e7617466 gate on tslint 2018-10-09 19:10:35 +03:00
bors[bot]
434e30e19f Merge #107
107: Switch to absolute offsets for extend comment word r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2018-10-09 16:06:43 +00:00
Aleksey Kladov
b7bd456101 don't gate on appveyor 2018-10-09 19:06:05 +03:00
Aleksey Kladov
5d1dae83a1 Switch to absolute offsets for extend comment word 2018-10-09 18:53:35 +03:00
Aleksey Kladov
91f99920bd Fix link to appveyor's CI 2018-10-09 18:29:25 +03:00
Aleksey Kladov
82447ecace
Merge pull request #108 from rust-analyzer/readme
fix readme
2018-10-09 16:21:00 +03:00
Aleksey Kladov
f17296e1c1 fix readme 2018-10-09 16:18:54 +03:00
Aleksey Kladov
239213a3db Prepare gen_lsp_server for publishing 2018-10-09 12:55:23 +03:00
bors[bot]
c9798c0e6d Merge #104
104: Add vscode extension to CI r=aochagavia a=DJMcNab

Note that this testing is only done on travis - we are only running formatting and linting, so feature parity on appveyor is not required.

CC @aochagavia.

Fixes? #100

Co-authored-by: Daniel McNab <36049421+djmcnab@users.noreply.github.com>
2018-10-09 06:16:36 +00:00
Daniel McNab
e26071d96e Run prettier on all files 2018-10-08 22:38:33 +01:00
Daniel McNab
3a405b65d6 Add tslint and prettier to ci 2018-10-08 22:36:47 +01:00
bors[bot]
f4ad36e972 Merge #103
103: WIP: refactor vscode extension r=aochagavia a=aochagavia

Todo:

- [x] Add more comments, so other people can find their way in the codebase
- [x] Resolve remaining tslint suggestions
- [ ] Integrate with CI

@matklad The standard configuration of tslint forbids using `console.log` and `console.error`. Is there any reason we are using those or can I remove them? If they are used for debugging purposes I would prefer to remove them and rely on vscode's excellent debugger.

Co-authored-by: Adolfo Ochagavía <aochagavia92@gmail.com>
2018-10-08 19:39:52 +00:00
Adolfo Ochagavía
bbf38b9e72 Add some comments 2018-10-08 20:55:22 +02:00
Adolfo Ochagavía
62b1b05a0d Fix remaining tslint suggestions 2018-10-08 20:18:55 +02:00
Aleksey Kladov
a05e09e9c5 Attach comments smartly 2018-10-08 17:36:38 +03:00
Aleksey Kladov
b642e6c645 replace loop with iterators 2018-10-08 15:46:14 +03:00
Aleksey Kladov
86a7ac2d31 Simplify event processing 2018-10-08 15:44:00 +03:00
Aleksey Kladov
3c12d38a32 tfn snippet 2018-10-08 14:08:31 +03:00
Adolfo Ochagavía
4d62cfccbb Apply tslint suggestions, round one 2018-10-07 23:12:40 +02:00
Adolfo Ochagavía
69de7e2fd7 Refactor vscode extension 2018-10-07 23:03:38 +02:00
bors[bot]
e4fdfd1501 Merge #98
98: WIP: Add resolve_local_name to resolve names in a function scope r=kjeremy a=kjeremy

First step to resolving #80 

Co-authored-by: Jeremy A. Kolb <jkolb@ara.com>
2018-10-07 17:01:57 +00:00
bors[bot]
f53c8aee06 Merge #96
96: [WIP] Begin to add some contributing docs (#95) r=matklad a=DJMcNab

Currently adds some documentation about `cargo gen-kinds`.

Note that I am unsure of some of the details, such as why `DOT` is in `multi_byte_tokens`, hence the [WIP] tag.

Based on #95.

Co-authored-by: Daniel McNab <36049421+djmcnab@users.noreply.github.com>
2018-10-07 08:33:00 +00:00
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