Commit graph

117 commits

Author SHA1 Message Date
bors[bot]
6044ec5057 Merge #395
395: generalize r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2018-12-31 16:06:27 +00:00
Aleksey Kladov
862c99d0d5 generalize highlighting to work with nodes 2018-12-31 19:06:00 +03:00
Aleksey Kladov
f1e8ebfbeb generalize extend selection to work with nodes 2018-12-31 19:01:51 +03:00
Jan Jansen
05daa86634 Make modules with tests runnable
Fixes #154
2018-12-31 15:00:04 +01:00
gfreezy
e1ef205a19 avoid allocating an unnecessary intermediate vector & not traverse multiple times 2018-12-30 23:03:43 +08:00
gfreezy
a3520bf01d implement struct shorthand initialization diagnostic 2018-12-30 22:26:59 +08:00
Aleksey Kladov
d7440a5f49 highlight macro idents 2018-12-28 18:17:43 +03:00
dependabot[bot]
a400444e33
Bump itertools from 0.7.11 to 0.8.0
Bumps [itertools](https://github.com/bluss/rust-itertools) from 0.7.11 to 0.8.0.
- [Release notes](https://github.com/bluss/rust-itertools/releases)
- [Commits](https://github.com/bluss/rust-itertools/compare/0.7.11...0.8.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-12-27 12:32:23 +00:00
bors[bot]
e422c2e2f4 Merge #325
325: implement translate_offset_with_edit r=matklad a=vemoo

- Implement `translate_offset_with_edit` to resolve #105 
- Add proptest impls for text, offsets and edits and use them in tests for `translate_offset_with_edit` and `LineIndex`
- Added benchmark for `translate_offset_with_edit`

Co-authored-by: Bernardo <berublan@gmail.com>
2018-12-27 12:19:19 +00:00
Aleksey Kladov
8c2c1bf9eb check edits in diagnostics 2018-12-27 13:35:08 +03:00
gfreezy
cd60998b9b fix use std::{self} 2018-12-27 00:51:27 +08:00
Bernardo
1cda43aafd test code and dependency cleanup 2018-12-25 21:26:36 +01:00
Bernardo
e9c186e48a change to TextEdit to avoid allocation and sort
rename newline to step where applicable
2018-12-25 20:49:18 +01:00
Bernardo
863ed19946 remove benchmark and simplify tests 2018-12-25 20:14:27 +01:00
Bernardo
6b2da4e547 use new translate_offset_with_edit for TryConvWith
doc comments
2018-12-25 20:06:49 +01:00
Bernardo
aff0124b37 add line_index proptest 2018-12-25 20:03:14 +01:00
Bernardo
c886b72dab make criterion args work, small simplification 2018-12-25 20:03:14 +01:00
Bernardo
dc2afae991 fix arbitrary offset generation, col translation working 2018-12-25 20:03:14 +01:00
Bernardo
5c8525ce4a column translation implemented but not quite working yet 2018-12-25 20:03:14 +01:00
Bernardo
36f2b1f3b9 iterate over Steps which are either, newlines or multibyte chars 2018-12-25 20:03:14 +01:00
Bernardo
1c44ba0f04 simplify newline check with macro 2018-12-25 20:03:14 +01:00
Bernardo
d6312085a1 remove slower impl, add benchmarks 2018-12-25 20:03:14 +01:00
Bernardo
a005d2a614 final iteration, faster a bit simpler
the main thing is we iterate over inserted newlines at once for each edit
2018-12-25 19:59:02 +01:00
Bernardo
7299df8409 simplified version 2018-12-25 19:59:02 +01:00
Bernardo
8c9df62c1c move translate_offset_with_edit to ra_editor 2018-12-25 19:59:02 +01:00
Bernardo
881c29192d initial newline translation working
todo:
cleanup, simplify
handle columns
2018-12-25 19:55:05 +01:00
gfreezy
16996e9947 fix tests 2018-12-26 01:00:27 +08:00
gfreezy
72eb9de747 add fix for removing unnecessary braces in use statements 2018-12-26 00:45:13 +08:00
bors[bot]
b65ba8f1d6 Merge #326
326: resolved #324: remove unnecessary braces in use statement. r=matklad a=gfreezy

Add inspection for unnecessary braces in use statement

Co-authored-by: gfreezy <gfreezy@gmail.com>
2018-12-24 18:39:31 +00:00
gfreezy
70df097c89 keep severity to Error & WeakWarning 2018-12-24 22:48:46 +08:00
Hirokazu Hata
c14ca038da Add make_pub_crate code action to ra_editor 2018-12-24 11:03:59 +09:00
gfreezy
346638c809 add serverity to vscode diagnostics 2018-12-24 00:39:33 +08:00
gfreezy
000aacafda resolved #324: remove unnecessary braces in use statement. 2018-12-23 23:50:11 +08:00
Aleksey Kladov
67ac0a423f join lines collapses use_trees 2018-12-21 21:06:01 +03:00
Aleksey Kladov
23b040962f fold curly blocks 2018-12-20 22:43:06 +03:00
Aleksey Kladov
8d7e8a175e generalize folding tests
By using xml-like tags, we will be able to test nested foldings.
2018-12-20 22:30:30 +03:00
Bernardo
0527e3b283 rename Edit to TextEdit and AtomEdit to AtomTextEdit 2018-12-11 19:07:17 +01:00
Bernardo
7344d28768 extract AtomEdit and Edit into new ra_text_edit crate 2018-12-10 22:09:12 +01:00
Bernardo
a062d844c2 use \b as word boundary 2018-12-09 15:50:56 +01:00
DJMcNab
e823db0698 Implement and test format hook 2018-12-09 10:29:13 +00:00
Bernardo
6fb267f5da find next whitespace or begining or end 2018-12-08 20:53:03 +01:00
bors[bot]
5ad7547ce2 Merge #264
264: check for empty range when extending in comment r=matklad a=vemoo

fix for #140 

Co-authored-by: Bernardo <berublan@gmail.com>
2018-12-08 17:43:15 +00:00
Bernardo
c22e901403 check for empty range when extending in comment 2018-12-08 18:26:19 +01:00
DJMcNab
f88e0700e6 Add a better text for hover and stop duplicating work done in approximatelly_resolve_symbol 2018-12-08 19:28:10 +03:00
Aleksey Kladov
28ddecf6c9 modernize even more 2018-12-06 21:16:37 +03:00
bors[bot]
0bdf8deb77 Merge #252
252: Improve 'introduce variable' r=matklad a=flodiebold

 - make it possible to extract a prefix of an expression statement (e.g.
   `<|>foo.bar()<|>.baz()`)
 - don't turn the last expression in a block into a let statement
 - also fix a few typos

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
2018-12-02 13:08:16 +00:00
Florian Diebold
2706456832 Improve 'introduce variable'
- make it possible to extract a prefix of an expression statement (e.g.
   <|>foo.bar()<|>.baz())
 - don't turn the last expression in a block into a let statement
2018-12-02 14:00:46 +01:00
Aleksey Kladov
edd3768a44 Add derive after doc comments 2018-12-02 12:19:22 +03:00
Aleksey Kladov
edeec6a414 Complete paths after :: 2018-11-21 18:34:20 +03:00
Adolfo Ochagavía
acd51cb361 cargo format 2018-11-16 12:16:20 +01:00