kjeremy
01238a6fd7
Filter out non callable versions of Struct/EnumVariant
2019-10-28 10:48:40 -04:00
Jeremy Kolb
ddf25e9481
formatting
2019-10-28 08:42:17 -04:00
Jeremy Kolb
44f2805fee
Fix syntax
2019-10-28 08:32:23 -04:00
Jeremy Kolb
49e89772f6
Preliminary enum variant support
2019-10-28 08:32:22 -04:00
Jeremy Kolb
55d4b06a53
Add disciminant
2019-10-28 08:32:22 -04:00
Jeremy Kolb
5a59bc9fcb
WIP: Expand signature help
...
This is hacky but works for tuple structs. Proof of concept.
2019-10-28 08:32:22 -04:00
bors[bot]
02828520a7
Merge #2097
...
2097: Be more precise with function signatures r=matklad a=kjeremy
Finds the closest call expr.
Fixes #2093
Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
2019-10-28 11:53:16 +00:00
Jeremy Kolb
1438f38eb6
Preserve whitespace at the end of doc comments
...
Whitespace can have special meaning in markdown. For instance
ending a line with three spaces will render a new line.
Note that this behavior diverges from RLS.
Fixes #1997
2019-10-27 16:56:25 -04:00
bors[bot]
46b63c462d
Merge #2099
...
2099: Fix panic on raw string assist r=matklad a=aee11
Strings that do not contain two quotation marks would cause a slice indexing panic because `find_usual_string_range` would return a range that only contained a single quotation mark.
Panic example:
```
fn main() {
let s = "<|>
}
```
I noticed a lot of panics from the `make_raw_string` assist while working on another issue today.
Co-authored-by: Alexander Elís Ebenesersson <alex2789@gmail.com>
2019-10-27 19:20:01 +00:00
Alexander Elís Ebenesersson
17bd3e59f8
Fix panic on raw string assist
...
Strings that do not contain two quotation marks
would cause a slice indexing panic because code
was assuming `find_usual_string_range` would return
a string with two quotes, but it would incorrectly
also return text ranges containing only a single quote.
2019-10-28 03:00:28 +09:00
Jeremy Kolb
a0d55edc38
Be more precise with function signatures
...
Fixes #2093
2019-10-27 12:26:44 -04:00
Aleksey Kladov
ad3fe316c6
further simplify assists
2019-10-27 18:22:14 +03:00
Aleksey Kladov
b6fcacd96d
move all assists to use generated docs
2019-10-27 17:49:39 +03:00
Aleksey Kladov
cda6355de2
simplify AssistCtx API
...
We never actually use ability to create multiple actions out of a
single context
2019-10-27 17:35:37 +03:00
Aleksey Kladov
9e638c9f3e
simplify
2019-10-27 17:27:05 +03:00
bors[bot]
ad950830d0
Merge #2090
...
2090: move public stuff to top r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-10-27 14:13:09 +00:00
Aleksey Kladov
85c64ec7be
use new api for flip_trait_bound assist
2019-10-27 17:02:43 +03:00
Wesley Norris
fc2fc8528b
Add tests for the trait bound flip assist.
...
Co-authored-by: vlthr <vlthr@users.noreply.github.com>
2019-10-27 16:52:33 +03:00
Wesley Norris
3a64a85a52
Fixes #2054 .
...
This adds the `flip_trait_bound` assist which allows for the swapping of two trait bounds in a trait list that are next to each other.
2019-10-27 16:52:33 +03:00
Aleksey Kladov
be0f48f7cf
move public stuff to top
2019-10-27 16:48:20 +03:00
Aleksey Kladov
73532e900e
rename auto_import -> add_import
...
We are long way from auto imports at the moment
2019-10-27 16:46:49 +03:00
Alexander Elís Ebenesersson
3e7e3fdf16
extend selection in trait bound extends to plus
...
When multiple traits bounds are present, expanded selection
from a single trait bound will include the nearest plus sign
(and whitespace after) before including the whole trait bound.
2019-10-27 21:29:06 +09:00
Aleksey Kladov
8464c45086
remove relative_path_buf workaround
...
The upstream problem was fixed with the change to 1.0
2019-10-27 12:36:40 +03:00
Aleksey Kladov
da5528824a
document almost all assists
2019-10-27 12:23:22 +03:00
Aleksey Kladov
860bbd56ef
lightly document assist_ctx module
2019-10-27 12:04:06 +03:00
Aleksey Kladov
8118dc1bb9
use more consistent naming
...
I think this is the first time I use global rename for rust-analyzer
itself :-)
2019-10-27 11:53:09 +03:00
Aleksey Kladov
61349a3d18
extract assist helper for getting a specific token
2019-10-27 11:53:01 +03:00
Aleksey Kladov
3840324429
raw string assists work in macros
2019-10-27 11:49:13 +03:00
Aleksey Kladov
a490ba06fa
document some more assists
2019-10-27 11:26:46 +03:00
Aleksey Kladov
cf4720ffd5
use unicode bar for drawing the cursor
2019-10-26 21:22:40 +03:00
Aleksey Kladov
4a83aae098
support range selection in assist docs
2019-10-26 20:57:23 +03:00
Aleksey Kladov
431e4ff4ef
avoid TextEditorBuilder for simple edits
2019-10-26 20:09:56 +03:00
Aleksey Kladov
a5cbd8d5e8
check style for assist docs
2019-10-26 19:08:13 +03:00
Aleksey Kladov
4ef9b8d17a
use correct spacing for enum pattern
2019-10-26 18:03:55 +03:00
Aleksey Kladov
3126152a84
document a couple of assists
2019-10-26 17:37:55 +03:00
Aleksey Kladov
394e474479
add blank lines for readability
2019-10-26 17:27:47 +03:00
Florian Diebold
b342ee5616
Upgrade Chalk (without using its dyn/impl Trait support)
2019-10-26 15:11:39 +02:00
Aleksey Kladov
d385438bcc
generate more assists docs
2019-10-25 23:38:15 +03:00
bors[bot]
c48b467eff
Merge #2069
...
2069: auto-generate assists docs and tests r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-10-25 11:50:06 +00:00
Aleksey Kladov
0dd35ff2b2
auto-generate assists docs and tests
2019-10-25 14:47:48 +03:00
bors[bot]
5f779f6c46
Merge #2066
...
2066: insert space after `->` r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-10-25 11:24:43 +00:00
Laurențiu Nicola
27a0cb3025
Specify working chalk revisions in manifest
2019-10-25 13:33:14 +03:00
Aleksey Kladov
d5cd8b5be2
disable the new typing handler for ->
...
It doesn't actually work with LSP
2019-10-25 13:03:57 +03:00
Aleksey Kladov
53e3bee0cf
insert space after ->
2019-10-25 12:41:34 +03:00
Aleksey Kladov
ea948e9fbb
refactor typing_handlers
2019-10-25 12:04:17 +03:00
Aleksey Kladov
6f00bb1cb0
introduce SingleFileChange
2019-10-25 11:49:38 +03:00
Aleksey Kladov
b112430ca7
move source change to a dedicated file
2019-10-25 11:30:50 +03:00
Aleksey Kladov
8d2fd59cfb
make typing infra slightly more extensible
2019-10-25 11:30:46 +03:00
Aleksey Kladov
dc65219ae1
document feature flags
2019-10-25 09:00:30 +03:00
kjeremy
64c1dd10b8
bump insta
2019-10-24 10:35:22 -04:00