Commit Graph

837 Commits

Author SHA1 Message Date
Aleksey Kladov
61518580ed introduce cancelable 2018-10-20 21:46:17 +03:00
Aleksey Kladov
73dd870da2 update salsa 2018-10-20 18:43:02 +03:00
bors[bot]
2ded93a78a Merge #143
143: Implement Find All References and Rename for local variables r=matklad a=kjeremy

Expose `find_all_refs` in `Analysis`. This currently only works for local variables.

Use this in the LSP to implement find all references and rename.

Co-authored-by: Jeremy A. Kolb <jkolb@ara.com>
2018-10-20 12:51:30 +00:00
Jeremy A. Kolb
3de77908eb Update vscode-languageclient package to support RenameOptions 2018-10-19 15:25:43 -04:00
Jeremy A. Kolb
9f9e41885c LSP: Add support for prepareRename 2018-10-19 15:25:10 -04:00
Jeremy A. Kolb
2844c8fdfa Handle renaming of local variables 2018-10-18 17:56:22 -04:00
Jeremy A. Kolb
3746689e9d Implement Find All References for local variables 2018-10-18 13:40:12 -04:00
bors[bot]
4dbf0379cc Merge #141
141: Update rowan r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2018-10-17 16:53:00 +00:00
Aleksey Kladov
00cdde2c52 Update rowan 2018-10-17 19:52:25 +03:00
bors[bot]
2a704035f4 Merge #137
137: rename gen-kinds to gen-syntax r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2018-10-16 18:17:40 +00:00
Aleksey Kladov
2f4a248f80 rename gen-kinds to gen-syntax 2018-10-16 21:17:19 +03:00
bors[bot]
06ab643b00 Merge #136
136: Teraro r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2018-10-16 17:54:33 +00:00
Aleksey Kladov
b43bcd43c6 fix tests 2018-10-16 20:53:19 +03:00
Aleksey Kladov
0b6d4983de Switch to published teraron 2018-10-16 20:36:45 +03:00
Aleksey Kladov
514aa3cf85 extract teraron 2018-10-16 20:31:30 +03:00
bors[bot]
1216878f7b Merge #134
134: Cargo Format run r=kjeremy a=kjeremy

I'm not sure how appreciated this is but I figured I would run `cargo fmt` and see what came up.

I made sure that `cargo test` still passes.

Co-authored-by: Jeremy A. Kolb <jkolb@ara.com>
2018-10-16 13:44:24 +00:00
Jeremy A. Kolb
61f3a438d3 Cargo Format
Run `cargo fmt` and ignore generated files
2018-10-16 09:41:10 -04:00
bors[bot]
39cb6c6d3f Merge #128
128: Add a test to verify if the generated codes are up-to-date. r=matklad a=mominul

This test checks if the generated codes are up-to-date every time during `cargo test`.

I have confirmed that the test works by manually editing the `grammar.ron` file.

Closes #126 

Thanks!

Co-authored-by: Muhammad Mominul Huque <mominul2082@gmail.com>
2018-10-16 12:24:26 +00:00
Muhammad Mominul Huque
2c4cfb297e
take &Path instead of PathBuf 2018-10-16 15:36:53 +06:00
bors[bot]
8c74fd9619 Merge #101
101: migrate to salsa-rs/salsa r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2018-10-15 20:59:33 +00:00
Aleksey Kladov
f30a7deff1 switch to salsa release 2018-10-15 23:57:46 +03:00
Aleksey Kladov
fc31ddd303 Simplify 2018-10-15 22:59:18 +03:00
Aleksey Kladov
85ff328d31 remove clones 2018-10-15 22:36:08 +03:00
Aleksey Kladov
bbcd998433 make analysis sync 2018-10-15 22:29:24 +03:00
Aleksey Kladov
76c51fae77 Tweak writable root API 2018-10-15 22:05:21 +03:00
Aleksey Kladov
8c88900fa9 remove resolver from world 2018-10-15 22:01:50 +03:00
Aleksey Kladov
ee69fddf02 Drop dead code 2018-10-15 21:56:01 +03:00
Muhammad Mominul Huque
9d9e637ef3
Refactor the constants 2018-10-16 00:54:27 +06:00
Aleksey Kladov
7503c5528f fix tests 2018-10-15 21:54:12 +03:00
Aleksey Kladov
062019590d Switch to the master of salsa 2018-10-15 21:25:54 +03:00
Aleksey Kladov
d783371b86 migrate modue map to salsa 2018-10-15 21:20:20 +03:00
Aleksey Kladov
d8aee31a60 start salsa migration 2018-10-15 21:19:49 +03:00
Aleksey Kladov
93d77e9b22 remove our own copy of salsa
salsa-rs/salsa is faster and more type safe
2018-10-15 21:12:19 +03:00
Aleksey Kladov
64b879d6a9 add salsa dep, break the world 2018-10-15 21:12:06 +03:00
bors[bot]
575b863507 Merge #132
132: Cache caro on Travis r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2018-10-15 18:02:28 +00:00
Aleksey Kladov
2a76389d6b Cache caro on Travis 2018-10-15 21:01:33 +03:00
bors[bot]
e929355eca Merge #129
129: 2018 r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2018-10-15 17:55:03 +00:00
Aleksey Kladov
9a98d8e99a regenerate 2018-10-15 20:54:07 +03:00
Aleksey Kladov
376639c70f Parse crate paths in expressions 2018-10-15 20:52:56 +03:00
Muhammad Mominul Huque
ce73df065f
Use CARGO_MANIFEST_DIR for locating the grammar.ron file 2018-10-15 23:52:11 +06:00
Aleksey Kladov
bb298158eb migrate analysis and server to 2018 2018-10-15 20:15:53 +03:00
Aleksey Kladov
2dd6858d03 switch ra_cli to 2018 2018-10-15 20:06:02 +03:00
Aleksey Kladov
1624bf2d7f switch editor to 2018 2018-10-15 20:05:26 +03:00
Aleksey Kladov
9434920648 switch base crates to 2018 2018-10-15 20:00:54 +03:00
Aleksey Kladov
e4d04a5df8 Mention 2018 in the readme 2018-10-15 19:56:37 +03:00
Aleksey Kladov
171c176833 Run cargo fix 2018-10-15 19:55:32 +03:00
Aleksey Kladov
6605dbaff3 Switch to beta 2018-10-15 19:54:37 +03:00
bors[bot]
a230b438e0 Merge #127
127: Improve folding r=matklad a=aochagavia

I was messing around with adding support for multiline comments in folding and ended up changing a bunch of other things. 

First of all, I am not convinced of folding groups of successive items. For instance, I don't see why it is worthwhile to be able to fold something like the following:

```rust
use foo;
use bar;
```

Furthermore, this causes problems if you want to fold a multiline import:

```rust
use foo::{
  quux
};
use bar;
```

The problem is that now there are two possible folds at the same position: we could fold the first use or we could fold the import group. IMO, the only place where folding groups makes sense is when folding comments. Therefore I have **removed folding import groups in favor of folding multiline imports**.

Regarding folding comments, I made it a bit more robust by requiring that comments can only be folded if they have the same flavor. So if you have a bunch of `//` comments followed by `//!` comments, you will get two separate fold groups instead of a single one.

Finally, I rewrote the API in such a way that it should be trivial to add new folds. You only need to:

* Create a new FoldKind
* Add it to the `fold_kind` function that converts from `SyntaxKind` to `FoldKind`

Fixes #113 

Co-authored-by: Adolfo Ochagavía <github@adolfo.ochagavia.xyz>
2018-10-15 16:48:17 +00:00
bors[bot]
e031b65f93 Merge #110
110: Signature help r=matklad a=kjeremy

@matklad Once this is in shape I would like to add tests. I think a separate PR should be done for returning documentation information and markdown.

Fixes #102 

Co-authored-by: Jeremy A. Kolb <jkolb@ara.com>
2018-10-15 16:41:57 +00:00
bors[bot]
8cec1d9861 Merge #112
112: brush up docs r=matklad a=matklad

@kjeremy @aochagavia @DJMcNab anything else significant to add here?

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2018-10-14 22:15:25 +00:00