]> git.lizzy.rs Git - rust.git/log
rust.git
4 years agoMerge #4193
bors[bot] [Tue, 28 Apr 2020 20:05:08 +0000 (20:05 +0000)]
Merge #4193

4193: Make it impossible to forget to add a semantic token type / modifier r=kjeremy a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoMerge #4184
bors[bot] [Tue, 28 Apr 2020 19:57:23 +0000 (19:57 +0000)]
Merge #4184

4184: Treat comments beginning with four slashes as regular line comments r=kjeremy a=adamrk

Addresses https://github.com/rust-analyzer/rust-analyzer/issues/4040

Co-authored-by: adamrk <ark.email@gmail.com>
4 years agoFix comment prefix method for four slash comments
adamrk [Tue, 28 Apr 2020 19:13:37 +0000 (21:13 +0200)]
Fix comment prefix method for four slash comments

4 years agoMerge #4148
bors[bot] [Tue, 28 Apr 2020 18:44:34 +0000 (18:44 +0000)]
Merge #4148

4148: Simplify profiler impl (bubble up Option) r=matklad a=Veetaha

Co-authored-by: veetaha <veetaha2@gmail.com>
4 years agoMerge pull request #4157 from lnicola/glibc-releases
Aleksey Kladov [Tue, 28 Apr 2020 18:16:11 +0000 (20:16 +0200)]
Merge pull request #4157 from lnicola/glibc-releases

Use x86_64-unknown-linux-gnu for releases

4 years agoUse x86_64-unknown-linux-gnu for releases
Laurențiu Nicola [Sun, 26 Apr 2020 11:53:33 +0000 (14:53 +0300)]
Use x86_64-unknown-linux-gnu for releases

4 years agoMake it impossible to forget to add a semantic token type / modifier
Aleksey Kladov [Tue, 28 Apr 2020 15:14:05 +0000 (17:14 +0200)]
Make it impossible to forget to add a semantic token type / modifier

4 years agoMerge #4190
bors[bot] [Tue, 28 Apr 2020 14:21:22 +0000 (14:21 +0000)]
Merge #4190

4190: tiny fix in markdown ordered list r=edwin0cheng a=JOE1994

`.3` => `3.`

Co-authored-by: Youngsuk Kim <joseph942010@gmail.com>
4 years agotiny fix in markdown ordered list
Youngsuk Kim [Tue, 28 Apr 2020 14:18:12 +0000 (10:18 -0400)]
tiny fix in markdown ordered list

`.3` => `3.`

4 years agoMerge #4183
bors[bot] [Tue, 28 Apr 2020 12:45:30 +0000 (12:45 +0000)]
Merge #4183

4183: Introduce new semantic highlight token for format specifier r=matklad a=ltentrup

Follow up from #4006: Instead of using the `attribute` highlight token, introduce a new semantic token for format specifier.

Co-authored-by: Leander Tentrup <leander.tentrup@gmail.com>
4 years agoIntroduce new semantic highlight token for format specifier
Leander Tentrup [Tue, 28 Apr 2020 07:44:20 +0000 (09:44 +0200)]
Introduce new semantic highlight token for format specifier

4 years agoTreat comments beginning with four slashes as regular line comments
adamrk [Tue, 28 Apr 2020 08:23:45 +0000 (10:23 +0200)]
Treat comments beginning with four slashes as regular line comments

4 years agoMerge #4173
bors[bot] [Mon, 27 Apr 2020 20:12:27 +0000 (20:12 +0000)]
Merge #4173

4173: Use core instead of std for builtin derive macros r=edwin0cheng a=edwin0cheng

Fixed #4087.

We can't use `$crate` here right now because :

1. We have to able to detect `macro` 2.0 in collecting phase for finding `rustc_builtin_macro` attrs.
2. And we have to make hygiene works for builtin derive macro.

r= @flodiebold

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
4 years agoCheck dep name to detect it is core
Edwin Cheng [Mon, 27 Apr 2020 20:11:24 +0000 (04:11 +0800)]
Check dep name to detect it is core

4 years agoUse empty-deps tricks to detect it is core
Edwin Cheng [Mon, 27 Apr 2020 19:32:47 +0000 (03:32 +0800)]
Use empty-deps tricks to detect it is core

4 years agoAdd test
Edwin Cheng [Mon, 27 Apr 2020 18:10:17 +0000 (02:10 +0800)]
Add test

4 years agoUse core instead of std for builtin derive macros
Edwin Cheng [Mon, 27 Apr 2020 17:48:55 +0000 (01:48 +0800)]
Use core instead of std for builtin derive macros

4 years agoMerge #4158
bors[bot] [Sun, 26 Apr 2020 20:33:38 +0000 (20:33 +0000)]
Merge #4158

4158: Clarify rust-analyzer binary  install r=matklad a=zoechi

Co-authored-by: Günter Zöchbauer <guenter@gzoechbauer.com>
4 years agoAdd missing .
Günter Zöchbauer [Sun, 26 Apr 2020 17:40:13 +0000 (19:40 +0200)]
Add missing .

4 years agoMerge #4159
bors[bot] [Sun, 26 Apr 2020 15:38:36 +0000 (15:38 +0000)]
Merge #4159

4159: For associated type shorthand (T::Item), use the substs from the where clause r=matklad a=flodiebold

So e.g. if we have `fn foo<T: SomeTrait<u32>>() -> T::Item`, we want to lower that to `<T as SomeTrait<u32>>::Item` and not `<T as SomeTrait<_>>::Item`.

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
4 years agoChange install directory suggestion to `~/.local/bin`
Günter Zöchbauer [Sun, 26 Apr 2020 15:11:44 +0000 (17:11 +0200)]
Change install directory suggestion to `~/.local/bin`

instead of `~/.cargo/bin`

4 years agoxtask does not need to be installed
Günter Zöchbauer [Sun, 26 Apr 2020 15:08:15 +0000 (17:08 +0200)]
xtask does not need to be installed

because it's contained in the dart-analyzer repo.

4 years agoFor associated type shorthand (T::Item), use the substs from the where clause
Florian Diebold [Sun, 26 Apr 2020 14:56:25 +0000 (16:56 +0200)]
For associated type shorthand (T::Item), use the substs from the where clause

So e.g. if we have `fn foo<T: SomeTrait<u32>>() -> T::Item`, we want to lower
that to `<T as SomeTrait<u32>>::Item` and not `<T as SomeTrait<_>>::Item`.

4 years agoClarify rust-analyzer binary install
Günter Zöchbauer [Sun, 26 Apr 2020 13:44:05 +0000 (15:44 +0200)]
Clarify rust-analyzer binary  install

4 years agoMerge #4155
bors[bot] [Sun, 26 Apr 2020 08:54:42 +0000 (08:54 +0000)]
Merge #4155

4155: Precompute expected type during completion r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoPrecompute expected type during completion
Aleksey Kladov [Sun, 26 Apr 2020 08:54:08 +0000 (10:54 +0200)]
Precompute expected type during completion

4 years agoMerge #4154
bors[bot] [Sun, 26 Apr 2020 08:41:22 +0000 (08:41 +0000)]
Merge #4154

4154: Add `cargo test` to the list of Run commands r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoAdd `cargo test` to the list of Run commands
Aleksey Kladov [Sun, 26 Apr 2020 08:40:13 +0000 (10:40 +0200)]
Add `cargo test` to the list of Run commands

4 years agoSimplify profiler impl (bubble up Option and shorten code
veetaha [Sat, 25 Apr 2020 21:10:44 +0000 (00:10 +0300)]
Simplify profiler impl (bubble up Option and shorten code

4 years agoMerge #4146
bors[bot] [Sat, 25 Apr 2020 20:30:50 +0000 (20:30 +0000)]
Merge #4146

4146: Don't add call parens when an fn type is expected r=matklad a=jonas-schievink

This is pretty useful when dealing with callback- or fn-pointer-heavy FFI code, as I have recently.

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
4 years agoFix broken test
Jonas Schievink [Sat, 25 Apr 2020 20:23:56 +0000 (22:23 +0200)]
Fix broken test

4 years agoDon't add call parens when an fn type is expected
Jonas Schievink [Sat, 25 Apr 2020 19:34:38 +0000 (21:34 +0200)]
Don't add call parens when an fn type is expected

4 years agoMerge #4145
bors[bot] [Sat, 25 Apr 2020 19:30:04 +0000 (19:30 +0000)]
Merge #4145

4145: Remove dead code r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoMerge #4113 #4136 #4141 #4142
bors[bot] [Sat, 25 Apr 2020 19:23:15 +0000 (19:23 +0000)]
Merge #4113 #4136 #4141 #4142

4113: Support returning non-hierarchical symbols r=matklad a=kjeremy

If `hierarchicalDocumentSymbolSupport` is not true in the client capabilites
then it does not support the `DocumentSymbol[]` return type from the
`textDocument/documentSymbol` request and we must fall back to `SymbolInformation[]`.

This is one of the few requests that use the client capabilities to
differentiate between return types and could cause problems for clients.

See https://github.com/microsoft/language-server-protocol/pull/538#issuecomment-442510767 for more context.

Found while looking at #144

4136: add support for cfg feature attributes on expression #4063 r=matklad a=bnjjj

close issue #4063

4141: Fix typo r=matklad a=Veetaha

4142: Remove unnecessary async from vscode language client creation r=matklad a=Veetaha

Co-authored-by: kjeremy <kjeremy@gmail.com>
Co-authored-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
Co-authored-by: veetaha <veetaha2@gmail.com>
4 years agoRemove dead code
Aleksey Kladov [Sat, 25 Apr 2020 19:11:18 +0000 (21:11 +0200)]
Remove dead code

4 years agoExtract messy tree handling out of profiling code
Aleksey Kladov [Sat, 25 Apr 2020 19:04:04 +0000 (21:04 +0200)]
Extract messy tree handling out of profiling code

4 years agoFix panic in NoSuchField diagnostic
Aleksey Kladov [Sat, 25 Apr 2020 18:56:25 +0000 (20:56 +0200)]
Fix panic in NoSuchField diagnostic

4 years agoRemove unnecessary async from vscode language client creation
veetaha [Sat, 25 Apr 2020 17:52:50 +0000 (20:52 +0300)]
Remove unnecessary async from vscode language client creation

4 years agoSimplify
Aleksey Kladov [Sat, 25 Apr 2020 17:50:42 +0000 (19:50 +0200)]
Simplify

4 years agoFix typo
veetaha [Sat, 25 Apr 2020 17:49:51 +0000 (20:49 +0300)]
Fix typo

4 years agoSimplify hprof
Aleksey Kladov [Sat, 25 Apr 2020 17:29:41 +0000 (19:29 +0200)]
Simplify hprof

4 years agoMove hprof to a separate file
Aleksey Kladov [Sat, 25 Apr 2020 13:02:09 +0000 (15:02 +0200)]
Move hprof to a separate file

4 years agominor clenup
Aleksey Kladov [Sat, 25 Apr 2020 12:52:23 +0000 (14:52 +0200)]
minor clenup

4 years agoMerge #4139
bors[bot] [Sat, 25 Apr 2020 16:26:51 +0000 (16:26 +0000)]
Merge #4139

4139: Add check for rules that no repetition which could match an empty token r=matklad a=edwin0cheng

Fix #4103

for `/ui/issues/issue-57597.rs`

This is `ParseError` of the macro rules , because it is how rustc handle it :

https://github.com/rust-lang/rust/blob/a58b1ed44f5e06976de2bdc4d7dc81c36a96934f/src/librustc_expand/mbe/macro_rules.rs#L558

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
4 years agoMerge #4137
bors[bot] [Sat, 25 Apr 2020 16:19:21 +0000 (16:19 +0000)]
Merge #4137

4137: Prefer core/alloc paths on #![no_std] r=matklad a=jonas-schievink

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
4 years agoChecks no repetition for an empty token
Edwin Cheng [Sat, 25 Apr 2020 15:09:20 +0000 (23:09 +0800)]
Checks no repetition for an empty token

4 years agoMerge #4133
bors[bot] [Sat, 25 Apr 2020 14:30:10 +0000 (14:30 +0000)]
Merge #4133

4133: main: eagerly prime goto-definition caches r=matklad a=BurntSushi

This commit eagerly primes the caches used by goto-definition by
submitting a "phantom" goto-definition request. This is perhaps a bit
circuitous, but it does actually get the job done. The result of this
change is that once RA is finished its initial loading of a project,
goto-definition requests are instant. There don't appear to be any more
surprise latency spikes.

This _partially_ addresses #1650 in that it front-loads the latency of the
first goto-definition request, which in turn makes it more predictable and
less surprising. In particular, this addresses the use case where one opens
the text editor, starts reading code for a while, and only later issues the
first goto-definition request. Before this PR, that first goto-definition request
is guaranteed to have high latency in any reasonably sized project. But
after this PR, there's a good chance that it will now be instant.

What this _doesn't_ address is that initial loading time. In fact, it makes it
longer by adding a phantom goto-definition request to the initial startup
sequence. However, I observed that while this did make initial loading
slower, it was overall a somewhat small (but not insignificant) fraction
of initial loading time.

-----

At least, the above is what I _want_ to do. The actual change in this PR is just a proof-of-concept. I came up with after an evening of printf-debugging. Once I found the spot where this cache priming should go, I was unsure of how to generate a phantom input. So I just took an input I knew worked from my printf-debugging and hacked it in. Obviously, what I'd like to do is make this more general such that it will always work.

I don't know whether this is the "right" approach or not. My guess is that there is perhaps a cleaner solution that more directly primes whatever cache is being lazily populated rather than fudging the issue with a phantom goto-definition request.

I created this as a draft PR because I'd really like help making this general. I think whether y'all want to accept this patch is perhaps a separate question. IMO, it seems like a good idea, but to be honest, I'm happy to maintain this patch on my own since it's so trivial. But I would like to generalize it so that it will work in any project.

My thinking is that all I really need to do is find a file and a token somewhere in the loaded project, and then use that as input. But I don't quite know how to connect all the data structures to do that. Any help would be appreciated!

cc @matklad since I've been a worm in your ear about this problem. :-)

Co-authored-by: Andrew Gallant <jamslam@gmail.com>
4 years agoPrefer core/alloc paths on #![no_std]
Jonas Schievink [Sat, 25 Apr 2020 14:24:44 +0000 (16:24 +0200)]
Prefer core/alloc paths on #![no_std]

4 years agomain: fix bug where thread pool isn't joined
Andrew Gallant [Sat, 25 Apr 2020 14:26:33 +0000 (10:26 -0400)]
main: fix bug where thread pool isn't joined

Pointed out here:
https://github.com/rust-analyzer/rust-analyzer/pull/4133#issuecomment-619386272

4 years agoadd support for cfg feature attributes on expression #4063
Benjamin Coenen [Sat, 25 Apr 2020 13:48:04 +0000 (15:48 +0200)]
add support for cfg feature attributes on expression #4063

Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
4 years agomain: eagerly prime goto-definition caches
Andrew Gallant [Sat, 25 Apr 2020 03:30:49 +0000 (23:30 -0400)]
main: eagerly prime goto-definition caches

This commit makes RA more aggressive about eagerly priming the caches.
In particular, this fixes an issue where even after RA was done priming
its caches, an initial goto-definition request would have very high
latency. This fixes that issue by requesting syntax highlighting for
everything. It is presumed that this is a tad wasteful, but not overly
so.

This commit also tweaks the logic that determines when the cache is
primed. Namely, instead of just priming it when the state is loaded
initially, we attempt to prime it whenever some state changes. This
fixes an issue where if a modification notification is seen before cache
priming is done, it would stop the cache priming early.

4 years agoMerge #4135
bors[bot] [Sat, 25 Apr 2020 12:25:28 +0000 (12:25 +0000)]
Merge #4135

4135: Rename StructField -> Field r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoRename StructField -> Field
Aleksey Kladov [Sat, 25 Apr 2020 12:23:34 +0000 (14:23 +0200)]
Rename StructField -> Field

4 years agoMerge #4134
bors[bot] [Sat, 25 Apr 2020 10:53:40 +0000 (10:53 +0000)]
Merge #4134

4134: Special case for empty comments in doc comment kind  r=matklad a=edwin0cheng

Part of #4103

Fix `ui/empty/empty-comment.rs macros`

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
4 years agoFix whitespaces
Edwin Cheng [Sat, 25 Apr 2020 10:49:46 +0000 (18:49 +0800)]
Fix whitespaces

4 years agoMerge #4125
bors[bot] [Sat, 25 Apr 2020 10:35:14 +0000 (10:35 +0000)]
Merge #4125

4125: Avoid lossy OsString conversions r=matklad a=lnicola

This is a bit invasive, and perhaps for not much benefit since non-UTF-8 environment variables don't work anyway.

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
4 years agoMerge #4131
bors[bot] [Sat, 25 Apr 2020 10:16:02 +0000 (10:16 +0000)]
Merge #4131

4131: Switch to text-size r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agotext-size 1.0.0
Aleksey Kladov [Sat, 25 Apr 2020 09:52:10 +0000 (11:52 +0200)]
text-size 1.0.0

4 years agoSwitch to TryFrom
Aleksey Kladov [Fri, 24 Apr 2020 22:57:47 +0000 (00:57 +0200)]
Switch to TryFrom

4 years agoCleanups
Aleksey Kladov [Fri, 24 Apr 2020 22:17:50 +0000 (00:17 +0200)]
Cleanups

4 years agoConvert tests to text-size
Aleksey Kladov [Fri, 24 Apr 2020 21:51:02 +0000 (23:51 +0200)]
Convert tests to text-size

4 years agoConvert code to text-size
Aleksey Kladov [Fri, 24 Apr 2020 21:40:41 +0000 (23:40 +0200)]
Convert code to text-size

4 years agoSpecial case for empty comments
Edwin Cheng [Sat, 25 Apr 2020 09:37:34 +0000 (17:37 +0800)]
Special case for empty comments

4 years agoAvoid lossy OsString conversions
Laurențiu Nicola [Fri, 24 Apr 2020 18:48:30 +0000 (21:48 +0300)]
Avoid lossy OsString conversions

4 years agoMerge #4128
bors[bot] [Fri, 24 Apr 2020 21:11:19 +0000 (21:11 +0000)]
Merge #4128

4128: Include correct item path for variant completions r=matklad a=jonas-schievink

The test would previously suggest `E::V`, which is not enough to name the variant as the enum is in a module. Now it correctly suggests the full path `m::E::V`.

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
4 years agoMerge #4129
bors[bot] [Fri, 24 Apr 2020 21:03:46 +0000 (21:03 +0000)]
Merge #4129

4129: Don't print cargo version to stdout, breaking everything r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoDon't print cargo version to stdout, breaking everything
Aleksey Kladov [Fri, 24 Apr 2020 21:02:10 +0000 (23:02 +0200)]
Don't print cargo version to stdout, breaking everything

4 years agoInclude correct item path for variant completions
Jonas Schievink [Fri, 24 Apr 2020 20:18:59 +0000 (22:18 +0200)]
Include correct item path for variant completions

4 years agoMerge #3998 #4006
bors[bot] [Fri, 24 Apr 2020 20:10:54 +0000 (20:10 +0000)]
Merge #3998 #4006

3998: Make add_function generate functions in other modules via qualified path r=matklad a=TimoFreiberg

Additional feature for #3639

- [x] Add tests for paths with more segments
- [x] Make generating the function in another file work
- [x] Add `pub` or `pub(crate)` to the generated function if it's generated in a different module
- [x] Make the assist jump to the edited file
- [x] Enable file support in the `check_assist` helper

4006: Syntax highlighting for format strings r=matklad a=ltentrup

I have an implementation for syntax highlighting for format string modifiers `{}`.
The first commit refactors the changes in #3826 into a separate struct.
The second commit implements the highlighting: first we check in a macro call whether the macro is a format macro from `std`. In this case, we remember the format string node. If we encounter this node during syntax highlighting, we check for the format modifiers `{}` using regular expressions.

There are a few places which I am not quite sure:
- Is the way I extract the macro names correct?
- Is the `HighlightTag::Attribute` suitable for highlighting the `{}`?

Let me know what you think, any feedback is welcome!

Co-authored-by: Timo Freiberg <timo.freiberg@gmail.com>
Co-authored-by: Leander Tentrup <leander.tentrup@gmail.com>
Co-authored-by: Leander Tentrup <ltentrup@users.noreply.github.com>
4 years agoMerge #4127
bors[bot] [Fri, 24 Apr 2020 20:03:33 +0000 (20:03 +0000)]
Merge #4127

4127: More helpful error message if toolchain is not in PATH r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoMore helpful error message if toolchain is not in PATH
Aleksey Kladov [Fri, 24 Apr 2020 20:01:32 +0000 (22:01 +0200)]
More helpful error message if toolchain is not in PATH

4 years agoMerge #4126
bors[bot] [Fri, 24 Apr 2020 19:57:24 +0000 (19:57 +0000)]
Merge #4126

4126: Don't omit methods with self from path completion r=matklad a=jonas-schievink

It's sometimes useful to create a reference to these items (eg. for use as a function pointer). Perhaps these should be given lower score though, if that's possible?

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
4 years agoDon't omit methods with self from path completion
Jonas Schievink [Fri, 24 Apr 2020 19:46:18 +0000 (21:46 +0200)]
Don't omit methods with self from path completion

4 years agoMerge #4105
bors[bot] [Fri, 24 Apr 2020 16:05:16 +0000 (16:05 +0000)]
Merge #4105

4105: Adds attribute completions (#3941) r=matklad a=jrvidal

I've hacked together some basic completions for a few builtin attributes.

* I have no idea what `CompletionItemKind` we should set for them.
* There's plenty of fancy stuff we could do by detecting the item the attribute is being added to. Nothing of that here.
* Maybe we could complete as soon as you type `#` or `#!`?

I'm not sure what info exactly we can dump on `CompletionContext` and what we should query during the completion calculation itself. I've assumed adding an `is_attribute` field is OK, since it allows to discard the completion quickly if it doesn't apply. Later we inspect the AST to find out whether it is an inner attribute or not.

Co-authored-by: Roberto Vidal <vidal.roberto.j@gmail.com>
4 years agoAdds attribute completions (#3941)
Roberto Vidal [Thu, 23 Apr 2020 16:22:33 +0000 (18:22 +0200)]
Adds attribute completions (#3941)

4 years agoSupport returning non-hierarchical symbols
kjeremy [Fri, 24 Apr 2020 14:11:57 +0000 (10:11 -0400)]
Support returning non-hierarchical symbols

If `hierarchicalDocumentSymbolSupport` is not true in the client capabilites
then it does not support the `DocumentSymbol[]` return type from the
`textDocument/documentSymbol` request and we must fall back to `SymbolInformation[]`.

This is one of the few requests that use the client capabilities to
differentiate between return types and could cause problems for clients.

See https://github.com/microsoft/language-server-protocol/pull/538#issuecomment-442510767 for more context.

Found while looking at #144

4 years agoAdd hierarchical symbols client capability
kjeremy [Fri, 24 Apr 2020 14:08:45 +0000 (10:08 -0400)]
Add hierarchical symbols client capability

4 years agoMerge #4121
bors[bot] [Fri, 24 Apr 2020 11:29:44 +0000 (11:29 +0000)]
Merge #4121

4121: Better label for macros completion r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoBetter label for macros completion
Aleksey Kladov [Fri, 24 Apr 2020 11:15:39 +0000 (13:15 +0200)]
Better label for macros completion

4 years agoMerge #4101
bors[bot] [Fri, 24 Apr 2020 01:28:53 +0000 (01:28 +0000)]
Merge #4101

4101: Panic proc macro srv if read request failed r=matklad a=edwin0cheng

This PR fixed a bug when the rust-analyzer is killed suddenly, the `rust-analyzer proc-macro` will become stale.

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
4 years agoRefactor a bit
Edwin Cheng [Fri, 24 Apr 2020 01:27:37 +0000 (09:27 +0800)]
Refactor a bit

4 years agoMerge #4118
bors[bot] [Fri, 24 Apr 2020 00:58:44 +0000 (00:58 +0000)]
Merge #4118

4118: :arrow_up: crates (to bust the caches) r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years ago:arrow_up: crates (to bust the caches)
Aleksey Kladov [Fri, 24 Apr 2020 00:58:21 +0000 (02:58 +0200)]
:arrow_up: crates (to bust the caches)

4 years agoMerge #4117
bors[bot] [Fri, 24 Apr 2020 00:45:34 +0000 (00:45 +0000)]
Merge #4117

4117: Honor snippet capability r=matklad a=matklad

closes #2518

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoHonor snippet capability
Aleksey Kladov [Fri, 24 Apr 2020 00:39:07 +0000 (02:39 +0200)]
Honor snippet capability

closes #2518

4 years agoMerge #4116
bors[bot] [Fri, 24 Apr 2020 00:27:38 +0000 (00:27 +0000)]
Merge #4116

4116: Make sure that adding a snippet requires corresponding capability r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoMake sure that adding a snippet requires corresponding capability
Aleksey Kladov [Fri, 24 Apr 2020 00:26:38 +0000 (02:26 +0200)]
Make sure that adding a snippet requires corresponding capability

4 years agoIntroduce internal snippet cap
Aleksey Kladov [Fri, 24 Apr 2020 00:06:12 +0000 (02:06 +0200)]
Introduce internal snippet cap

4 years agoMove CompletionConfig to a separate module
Aleksey Kladov [Fri, 24 Apr 2020 00:01:23 +0000 (02:01 +0200)]
Move CompletionConfig to a separate module

4 years agoMerge #4114
bors[bot] [Thu, 23 Apr 2020 23:54:21 +0000 (23:54 +0000)]
Merge #4114

4114: Refactor completion sorting r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoDon't set sortText
Aleksey Kladov [Thu, 23 Apr 2020 23:52:26 +0000 (01:52 +0200)]
Don't set sortText

I might be reading this wrong, but it looks like we are setting it to
essentially arbitrary string at the moment, as there are no defined
order on the items in the *set* of completions.

4 years agoAdd test marks
Aleksey Kladov [Thu, 23 Apr 2020 23:48:32 +0000 (01:48 +0200)]
Add test marks

4 years agoIntroduce ActiveParameter
Aleksey Kladov [Thu, 23 Apr 2020 23:46:00 +0000 (01:46 +0200)]
Introduce ActiveParameter

4 years agoMove tests to where they belong
Aleksey Kladov [Thu, 23 Apr 2020 23:25:54 +0000 (01:25 +0200)]
Move tests to where they belong

4 years agoRefactor
Aleksey Kladov [Thu, 23 Apr 2020 23:24:08 +0000 (01:24 +0200)]
Refactor

4 years agoRestore CompletionItem immutability
Aleksey Kladov [Thu, 23 Apr 2020 23:17:33 +0000 (01:17 +0200)]
Restore CompletionItem immutability

4 years agoMore functional
Aleksey Kladov [Thu, 23 Apr 2020 23:08:27 +0000 (01:08 +0200)]
More functional

4 years agoMove
Aleksey Kladov [Thu, 23 Apr 2020 22:11:33 +0000 (00:11 +0200)]
Move

4 years agoMerge #4106
bors[bot] [Thu, 23 Apr 2020 21:58:52 +0000 (21:58 +0000)]
Merge #4106

4106: Fix wrong substitution code r=matklad a=flodiebold

We need to shift in when we're substituting inside a binder.

This should fix #4053 (it doesn't fix the occasional overflow that also occurs on the Diesel codebase though).

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
4 years agoFix wrong substitution code
Florian Diebold [Thu, 23 Apr 2020 18:50:14 +0000 (20:50 +0200)]
Fix wrong substitution code

We need to shift in when we're substituting inside a binder.

This should fix #4053 (it doesn't fix the occasional overflow that also occurs
on the Diesel codebase though).