Commit graph

7770 commits

Author SHA1 Message Date
bors[bot]
5b13c2411f
Merge #5516
5516: Better LSP conformance r=matklad a=vsrs

At the moment rust-analyzer does not fully conform to the LSP. This PR fixes two LSP related issues:

1) rust-analyzer sends predefined server capabilities and does not take supplied client capabilities in mind.
2) rust-analyzer uses dynamic `textDocument/didSave` registration even if the client does not support it.


Co-authored-by: vsrs <vit@conrlab.com>
2020-07-24 13:53:41 +00:00
Bram van den Heuvel
090f02bc18 Increace tracing-tree version from 0.1.3 to 0.1.4 2020-07-24 15:41:52 +02:00
vsrs
a84dc4425a Always send experimental & semantic server caps. 2020-07-24 16:29:35 +03:00
kjeremy
48da2d4c16 Add DocumentData to represent in-memory document with LSP info 2020-07-24 09:02:57 -04:00
bors[bot]
c3defe2532
Merge #5518
5518: Use resolved paths in SSR rules r=matklad a=davidlattimore

The main user-visible changes are:
* SSR now matches paths based on whether they resolve to the same thing instead of whether they're written the same.
  * So `foo()` won't match `foo()` if it's a different function `foo()`, but will match `bar::foo()` if it's the same `foo`.
* Paths in the replacement will now be rendered with appropriate qualification for their context.
  * For example `foo::Bar` will render as just `Bar` inside the module `foo`, but might render as `baz::foo::Bar` from elsewhere.
* This means that all paths in the search pattern and replacement template must be able to be resolved.
* It now also matters where you invoke SSR from, since paths are resolved relative to wherever that is.
* Search now uses find-uses on paths to locate places to try matching. This means that when a path is present in the pattern, search will generally be pretty fast.
* Function calls can now match method calls again, but this time only if they resolve to the same function.

Co-authored-by: David Lattimore <dml@google.com>
2020-07-24 12:46:55 +00:00
Aleksey Kladov
a432f87d66 Cache macro expansion in semantics
#5497 accidentally made syntax highlighting quadratic, due to
 repeated tokentreeizing of macros.
2020-07-24 14:12:13 +02:00
Aleksey Kladov
b9ef6cf295 Add missing cancellation point 2020-07-24 13:51:27 +02:00
David Lattimore
3dac31fe80 SSR: Allow function calls to match method calls
This differs from how this used to work before I removed it in that:
a) It's only one direction. Function calls in the pattern can match
method calls in the code, but not the other way around.
b) We now check that the function call in the pattern resolves to the
same function as the method call in the code.

The lack of (b) was the reason I felt the need to remove the feature
before.
2020-07-24 21:34:00 +10:00
David Lattimore
8d09ab86ed SSR: Disable matching within use declarations
It currently does the wrong thing when the use declaration contains
braces.
2020-07-24 21:34:00 +10:00
David Lattimore
63f500b0ee SSR: Use Definition::find_usages to speed up matching.
When the search pattern contains a path, this substantially speeds up finding matches, especially if the path references a private item.
2020-07-24 21:34:00 +10:00
David Lattimore
757f755c29 SSR: Match paths based on what they resolve to
Also render template paths appropriately for their context.
2020-07-24 21:34:00 +10:00
David Lattimore
3975952601 SSR: Pass current file position through to SSR code.
In a subsequent commit, it will be used for resolving paths.
2020-07-24 21:34:00 +10:00
David Lattimore
02fc3d50ee SSR: Refactor to not rely on recursive search for nesting of matches
Previously, submatches were handled simply by searching in placeholders
for more matches. That only works if we search all nodes in the tree
recursively. In a subsequent commit, I intend to make search not always
be recursive recursive. This commit prepares for that by finding all
matches, even if they overlap, then nesting them and removing
overlapping matches.
2020-07-24 21:34:00 +10:00
David Lattimore
699619a65c SSR: Add a couple of tests for non-recursive search
These tests already pass, however once we switch to non-recursive
search, it'd be easy for these tests to not pass.
2020-07-24 21:34:00 +10:00
David Lattimore
6fcaaa1201 SSR tests: Define all paths needed for templates
In a later commit, paths in templates will be resolved. This allows us
to render the path with appropriate qualifiers for its context. Here we
prepare for that change by updating existing tests where I'd previously
not bothered to define the items that the template referred to.
2020-07-24 21:34:00 +10:00
David Lattimore
a45682ed96 Move iteration over all files into the SSR crate
The methods `edits_for_file` and `find_matches_in_file` are replaced with just `edits` and `matches`. This simplifies the API a bit, but more importantly it makes it possible in a subsequent commit for SSR to decide to not search all files.
2020-07-24 21:34:00 +10:00
David Lattimore
13f901f636 SSR: Move search code into a submodule
Also renamed find_matches to slow_scan_node to reflect that it's a slow
way to do things. Actually the name came from a later commit and
probably makes more sense once there's an alternative.
2020-07-24 21:34:00 +10:00
David Lattimore
113abbeefe SSR: Parse template as Rust code.
This is in preparation for a subsequent commit where we add special
handling for paths in the template, allowing them to be qualified
differently in different contexts.
2020-07-24 21:34:00 +10:00
David Lattimore
1fce8b6ba3 SSR: Change the way rules are stored internally.
Previously we had:

- Multiple rules
  - Each rule had its pattern parsed as an expression, path etc

This meant that there were two levels at which there could be multiple
rules.

Now we just have multiple rules. If a pattern can parse as more than one
kind of thing, then they get stored as multiple separate rules.

We also now don't have separate fields for the different kinds of things
that a pattern can parse as. This makes adding new kinds of things
simpler.

Previously, add_search_pattern would construct a rule with a dummy
replacement. Now the replacement is an Option. This is slightly cleaner
and also opens the way for parsing the replacement template as the same
kind of thing as the search pattern.
2020-07-24 21:34:00 +10:00
David Lattimore
2b53639e38 SSR: Use expect! in tests 2020-07-24 21:34:00 +10:00
bors[bot]
bc0a378070
Merge #5515
5515: Add profiling call r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-07-24 11:14:07 +00:00
Aleksey Kladov
c0d8921148 Add profiling call 2020-07-24 13:13:36 +02:00
vsrs
57b4ec4d5e Code formatting 2020-07-24 13:20:01 +03:00
vsrs
f195f876c3 Send dynamic didSave only if the client supports 2020-07-24 13:13:39 +03:00
vsrs
594ce72d1e Prepare server capabilities based on client ones. 2020-07-24 13:13:39 +03:00
bors[bot]
6ddcdb8b29
Merge #5511
5511: Set the document version after changes are applied but before vfs r=kjeremy a=kjeremy



Co-authored-by: kjeremy <kjeremy@gmail.com>
2020-07-23 21:49:51 +00:00
kjeremy
c9531dc797 Set the document version after changes are applied but before vfs 2020-07-23 17:46:21 -04:00
Aleksey Kladov
be06aaecde Lighter weight tempdir 2020-07-23 22:26:25 +02:00
Aleksey Kladov
7c0743293e Require quotes around key-value cfg flags in rust-project.json
This matches rustc command-line flags, as well as the build.rs format.
2020-07-23 19:03:17 +02:00
bors[bot]
243b997df4
Merge #5506
5506: Rename modules r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-07-23 15:23:25 +00:00
Aleksey Kladov
e2030405d5 Rename modules 2020-07-23 17:23:01 +02:00
bors[bot]
8df105b8b2
Merge #5505
5505: Cleanup CFG API r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-07-23 14:55:22 +00:00
Aleksey Kladov
38e38d9b29 Cleanup CFG API 2020-07-23 16:53:12 +02:00
bors[bot]
7bada8a76d
Merge #5473
5473: Changes to rust-project.json r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-07-23 13:58:45 +00:00
Aleksey Kladov
0cf8ee2dc2 Remove dead code 2020-07-23 15:57:25 +02:00
bors[bot]
83f364523f
Merge #5504
5504: Reduce visibility r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-07-23 13:13:05 +00:00
Aleksey Kladov
28adb8fe16 Reduce visibility 2020-07-23 15:07:01 +02:00
bors[bot]
bb4cb71f80
Merge #5498
5498: assists: change_return_type_to_result: clarify assist description r=matklad a=matthiaskrgr

I had a -> Option<PathBuf> fn, which I wanted to change to Result<PathBuf, _>, but despite advertising to do so, the assist did not change the result type to Result<PathBuf, _> but instead just wrapped it in a Result: <Result<Option<PathBuf>, _>.

I changed the assist description to "Wrap return type in Result" to clarify that the assist only wraps the preexisting type and does not do any actual Option-to-Result refactoring.

Co-authored-by: Matthias Krüger <matthias.krueger@famsik.de>
2020-07-23 12:48:08 +00:00
bors[bot]
37e1d1c526
Merge #5503
5503: Replace superslice with API on path to stabilization r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-07-23 11:01:29 +00:00
Aleksey Kladov
4f7a3fba59 Replace superslice with API on path to stabilization 2020-07-23 12:59:18 +02:00
bors[bot]
8a49f93793
Merge #5497
5497: Store macro invocation parameters as text instead of tt r=jonas-schievink a=lnicola

We don't want to expand macros on every source change because it can be arbitrarily slow, but the token trees can be rather large. So instead we can cache the invocation parameters (as text).

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2020-07-23 10:36:33 +00:00
Aleksey Kladov
c2d8829d56 minor 2020-07-23 10:26:56 +02:00
Matthias Krüger
29d3d04227 assists: change_return_type_to_result: clarify assist description
I had a -> Option<PathBuf> fn, which I wanted to change to Result<PathBuf, _>, but despite advertising to do so, the assist did not
change the result type to Result<PathBuf, _> but instead just wrapped it in a Result: <Result<Option<PathBuf>, _>.

I changed the assist description to "Wrap return type in Result" to clarify that the assist only wraps the preexisting type and does
not do any deep Option-to-Result refactoring.
2020-07-22 22:44:31 +02:00
kjeremy
7eedf19cfa Move deprecated attribute to where it is needed 2020-07-22 15:41:38 -04:00
Laurențiu Nicola
cb958cf5fe Store macro invocation parameters as text instead of tt 2020-07-22 21:50:37 +03:00
kjeremy
9a9c0e1105 Use symbol tags 2020-07-22 12:18:48 -04:00
bors[bot]
1c7d5f513c
Merge #5481
5481: Track document versions in the server r=kjeremy a=kjeremy

This also pushes diagnostics for the correct file version on close so that when it is reopened stale diagnostics are not shown.

Closes #5452 

Co-authored-by: kjeremy <kjeremy@gmail.com>
Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
2020-07-22 13:04:30 +00:00
Jeremy Kolb
4f4582a6ad
Update crates/rust-analyzer/src/main_loop.rs
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-07-22 08:59:05 -04:00
bors[bot]
dba534a103
Merge #5475
5475: Support `Trait as _` imports r=matklad a=jonas-schievink

Fixes https://github.com/rust-analyzer/rust-analyzer/issues/2736

Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
2020-07-22 12:17:51 +00:00
Jonas Schievink
dce9987436 Check that visibility upgrade path is hit 2020-07-22 14:01:50 +02:00
Aleksey Kladov
9ad41eb908 Setup global allocator in the correct crate
It worked before, but was roundabout
2020-07-22 13:42:53 +02:00
Aleksey Kladov
deed44a472 Remove support for jemalloc
We only used it for measuring memory usage, but now we can use glibc's
allocator for that just fine
2020-07-22 13:40:45 +02:00
bors[bot]
26932e0060
Merge #5478
5478: Replace existing visibility modifier in fix_visibility r=matklad a=TimoFreiberg

Fixes #4636

I would have liked to do something about the `// FIXME: this really should be a fix for diagnostic, rather than an assist.`, but that would take a while and there's no reason not to fix this immediately.

Co-authored-by: Timo Freiberg <timo.freiberg@gmail.com>
2020-07-22 11:11:36 +00:00
kjeremy
79a3dd085c Clear diagnostics for known file version on close 2020-07-21 14:18:22 -04:00
kjeremy
97927146db Store document version and pass back to the client 2020-07-21 14:07:42 -04:00
Jonas Schievink
56c090d0d0 Allow gathering memory stats on non-jemalloc Linux 2020-07-21 19:55:54 +02:00
Timo Freiberg
3d9c123104 Replace existing visibility modifier in fix_visibility 2020-07-21 18:58:00 +02:00
bors[bot]
a3ff2751b4
Merge #5476
5476: Cleanup extact variable r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-07-21 16:10:29 +00:00
Aleksey Kladov
be8a7048df Cleanup extact variable 2020-07-21 18:10:03 +02:00
Jonas Schievink
c07eaf868d Support Trait as _ imports 2020-07-21 17:55:17 +02:00
Aleksey Kladov
3bb1b3070a minor 2020-07-21 17:50:19 +02:00
Aleksey Kladov
b68ef1231d More Rustic API for Env 2020-07-21 17:17:21 +02:00
Aleksey Kladov
b48336bf94 Replace OUT_DIR in project.json with general env
OUT_DIR doesn't make sense here, as this is a cargo-specific concept
2020-07-21 15:12:12 +02:00
Aleksey Kladov
fe87aec7b6 Replace roots with include/exclude directories 2020-07-21 14:57:20 +02:00
Aleksey Kladov
39a2bc5e3c Expose package roots more directly 2020-07-21 12:52:51 +02:00
Laurențiu Nicola
daab8b2fd0 Remove insta dep 2020-07-21 13:11:51 +03:00
Laurențiu Nicola
f7e4b99d15 Replace remaining insta uses 2020-07-21 13:11:46 +03:00
bors[bot]
9518e2f9d6
Merge #5451 #5463 #5465 #5466
5451: Highlight more cases of SyntaxKind when it is a punctuation r=matklad a=GrayJack

This maybe closes #5406
Closes  #5453

Separate what one expect to be a punctuation semantic token (like `,`, `;`, `(`, etc), and what is not (`&`, `::`, `+`, etc)

5463: Bump lexer r=matklad a=kjeremy

Since we're now on rust 1.45

5465: Bump chalk r=matklad a=kjeremy



5466: Do not show default types in function and closure return values r=matklad a=SomeoneToIgnore

Avoid things like 
<img width="522" alt="image" src="https://user-images.githubusercontent.com/2690773/87985936-1bbe4f80-cae5-11ea-9b8a-5383d896c296.png">


Co-authored-by: GrayJack <gr41.j4ck@gmail.com>
Co-authored-by: kjeremy <kjeremy@gmail.com>
Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
2020-07-21 09:57:46 +00:00
bors[bot]
818aeb8a24
Merge #5467
5467: Allow null or empty values for configuration r=matklad a=kjeremy

Allow the client to respond to `workspace/configuration` with `null` values. This is allowed per the spec if the client doesn't know about the configuration we've requested.

This also protects against `null` or `{}` during initialize. I'm not sure if we want to interpret `{}` as "don't change anything" but I think that's a reasonable approach to take.

This should help with LSP clients working out of the box.

Fixes #5464 

Co-authored-by: kjeremy <kjeremy@gmail.com>
2020-07-21 09:41:54 +00:00
bors[bot]
2ad5bf8d17
Merge #5471
5471: Typo r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-07-21 08:50:47 +00:00
Aleksey Kladov
8f3fdf3315 Typo 2020-07-21 10:50:24 +02:00
bors[bot]
99b8140d91
Merge #5470
5470: Propagate cargo.target to checkOnSave r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-07-21 08:31:27 +00:00
Aleksey Kladov
a20b8d751b Propagate cargo.target to checkOnSave 2020-07-21 10:30:54 +02:00
bors[bot]
57664369af
Merge #5458
5458: Use expect in some ra_hir_ty tests r=flodiebold a=lnicola



Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2020-07-21 07:11:55 +00:00
GrayJack
5ca3855c06
On second thought, we want to preserve the textMate here where all punctuation that are from a Attr be highlited as Attribute 2020-07-20 23:37:31 -03:00
GrayJack
04d8dc4a10
# as Attribute
- Issue  #5453
2020-07-20 23:19:29 -03:00
GrayJack
462e0158da
@ as operator 2020-07-20 23:00:13 -03:00
kjeremy
a32dd9c478 Protect against {} 2020-07-20 18:11:32 -04:00
kjeremy
adc4bb5406 Allow client to respond to workspace/configuration with null values
This is allowed per the spec if the client doesn't know about the configuration
we've requested.
2020-07-20 17:42:48 -04:00
Kirill Bulatov
54cc3fee45 Do not show default types in closures 2020-07-20 23:50:41 +03:00
kjeremy
9cfb373665 Bump chalk 2020-07-20 15:50:35 -04:00
kjeremy
d8eec71dc9 Bump lexer 2020-07-20 15:37:50 -04:00
Laurențiu Nicola
b8e09b7f4e Inline lang items in coercion tests 2020-07-20 22:01:09 +03:00
bors[bot]
21b4e9178f
Merge #5440
5440: Minor perf tweaks per clippy r=matklad a=kjeremy



Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
2020-07-20 16:54:57 +00:00
Laurențiu Nicola
3b6979be77 Use expect in never_type tests 2020-07-20 19:38:52 +03:00
Laurențiu Nicola
b82899ad76 Use expect in coercion tests 2020-07-20 19:30:47 +03:00
Aleksey Kladov
3e688d2a93 Simplify 2020-07-20 18:01:42 +02:00
Aleksey Kladov
bc4d047267 Add is_workspace_member for rust-project.json
It is currently unused, but, in the future, it will be used to:

* drive certain UX (symbols search by default will look only in the
members)
* improve performance (rust-analyzer will assume that non-members
change rarely)

If not specified, is_workspace member is inferred from the path
2020-07-20 17:57:10 +02:00
Aleksey Kladov
c7ccfb072c Simplify 2020-07-20 17:44:44 +02:00
GrayJack
a662228de4
Assingment semantic highlight 2020-07-20 12:36:23 -03:00
GrayJack
54ebb2ce30
Handle semantic highlight when STAR is part of the *{const, mut} 2020-07-20 11:21:40 -03:00
GrayJack
73bab32aef
Highlight more cases of SyntaxKind when it is a punctuation 2020-07-20 09:46:50 -03:00
Jeremy Kolb
17f4d27f12 Minor perf tweaks per clippy 2020-07-19 14:26:24 -04:00
Pascal Hertleif
5516476a86
Fix a typo in completion docs 2020-07-19 18:25:19 +02:00
Wilco Kusee
e11006986a
Specify default adt representation for chalk integration 2020-07-19 15:26:51 +02:00
Aleksey Kladov
46ac9ff5e3 Simplify exclusion logic 2020-07-18 16:40:10 +02:00
Aleksey Kladov
b38f6b3c41 Don't show docs in concise signature help 2020-07-18 15:14:44 +02:00
Aleksey Kladov
a28aa175d4 Add turbo-fish works after () 2020-07-18 14:48:28 +02:00
bors[bot]
2777f8c295
Merge #5423
5423: Correctly resolve assoc. types in path bindings r=matklad a=jonas-schievink

Previously invoking goto def on `impl Iterator<Item<|> = ()>` would go to `Iterator`, not `Item`. This fixes that.

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2020-07-17 17:02:28 +00:00
Aleksey Kladov
7c082dcf0f More precise ranges in remove hashes assist 2020-07-17 16:39:03 +02:00
Aleksey Kladov
19e78020bd Remove insta for ra_hir_def 2020-07-17 15:54:40 +02:00
Aleksey Kladov
798f43da50 Fix out of bounds panic in active parameter 2020-07-17 15:44:37 +02:00
Jonas Schievink
cab360fe31 Correctly resolve assoc. types in path bindings 2020-07-17 14:58:49 +02:00
Aleksey Kladov
fcdac03033 Rewrite def map tests from insta to expect
Those indentation markers are annoying...
2020-07-17 14:37:51 +02:00
Aleksey Kladov
2c268b9a5f Move tests 2020-07-17 13:37:41 +02:00
bors[bot]
2ca0e9e00e
Merge #5327
5327: Mark fixes from check as preferred r=matklad a=kjeremy

This allows us to run the auto fix command from vscode to automatically fix diagnostics in the file.

They are also distinguished in the UI.

Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
2020-07-17 11:12:40 +00:00
bors[bot]
9b5ac1d82f
Merge #5417
5417: Mismatched arg count works for lambdas r=jonas-schievink a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-07-17 11:01:52 +00:00
Aleksey Kladov
d7548a36a7 Unclutter NavigationTarget API 2020-07-17 12:42:48 +02:00
Aleksey Kladov
393b7119bd Add test for fn pointers 2020-07-17 12:04:12 +02:00
Aleksey Kladov
371c5aec1c call_info works with closures 2020-07-17 12:04:10 +02:00
Aleksey Kladov
2729665235 Continue non-doc comments with trailing space 2020-07-17 11:20:28 +02:00
Aleksey Kladov
f88a737a43 Mismatched arg count works for lambdas 2020-07-17 10:52:18 +02:00
Aleksey Kladov
3823c2dc19 Remove FunctionSignature 2020-07-16 22:17:49 +02:00
Aleksey Kladov
a5ae8b8b92 Inlay hints use callables 2020-07-16 21:51:44 +02:00
Aleksey Kladov
edc0190f7a Rename 2020-07-16 21:33:11 +02:00
Aleksey Kladov
0265778e86 Don't use function signature for Display 2020-07-16 21:32:20 +02:00
Aleksey Kladov
e1e79cf064 Take label offets client capability into account 2020-07-16 18:48:02 +02:00
Aleksey Kladov
6da22ed975 Redner self as param for call infor for assoc fn call 2020-07-16 18:24:26 +02:00
Aleksey Kladov
a4e9681c79 Better module structure 2020-07-16 18:13:43 +02:00
Aleksey Kladov
29832b8c3d Reduce visibility 2020-07-16 18:07:53 +02:00
Aleksey Kladov
ff0312fa32 Semantical call info 2020-07-16 18:03:04 +02:00
Jeremy Kolb
d7cd88b1a2 Mark machine applicable fixes as preferred
This allows us to run the auto fix command from vscode to automatically
fix all diagnostics in the file.

They are also distinguished in the UI.
2020-07-16 10:51:25 -04:00
bors[bot]
9210fcc076
Merge #4676
4676: proc_macro: fix current nightly/future stable ABI incompatibility r=matklad a=robojumper

With rust-lang/rust#72233, the proc_macro ABI has changed, leading to the `test_derive_serialize_proc_macro` test believing that `serde` wants to pass the struct name as a byte string literal instead of a string literal.

Fixes #4866.

Co-authored-by: robojumper <robojumper@gmail.com>
2020-07-16 14:29:57 +00:00
Aleksey Kladov
b5ce84b170 Align CallableDefId naming with other ids 2020-07-16 13:16:34 +02:00
Aleksey Kladov
b598ab8be4 Rename CallableDefId -> InternedCallabelDefid 2020-07-16 13:13:17 +02:00
Aleksey Kladov
1d6cf33663 Simplify 2020-07-16 11:37:26 +02:00
Aleksey Kladov
bb2613ed4d Move type 2020-07-16 10:29:21 +02:00
Aleksey Kladov
1d63b3efc9 simplify 2020-07-16 10:25:36 +02:00
bors[bot]
6a74a91713
Merge #5401
5401: Implement Chalk closure support r=matklad a=flodiebold

This makes use of Chalk's closure support, which means we can get rid of our last built-in impls and a bunch of other surrounding stuff.

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
2020-07-16 08:02:39 +00:00
Jeremy Kolb
7fba2274d9 Update lsp-types for HoverOptions 2020-07-15 18:17:46 -04:00
Florian Diebold
2077004463 Remove TypeCtor interning
Our TypeCtor and Chalk's TypeName match now!
2020-07-15 22:07:13 +02:00
Florian Diebold
a48843a16a Use Chalk closure support 2020-07-15 22:04:49 +02:00
bors[bot]
b63e23e98e
Merge #5350
5350: Filter assists r=matklad a=kjeremy

Uses the `CodeActionContext::only` field to compute only those assists the client cares about.

It works but I don't really like the implementation.

Co-authored-by: kjeremy <kjeremy@gmail.com>
Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
2020-07-15 17:58:46 +00:00
bors[bot]
e30d39d502
Merge #5396
5396: Cap macro expansion depth for IDE features r=matklad a=matklad

closes #4453



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-07-15 15:19:07 +00:00
Aleksey Kladov
6b9c725673 Cap macro expansion depth for IDE features
closes #4453
2020-07-15 17:18:19 +02:00
Leander Tentrup
119e71d9ea Add new Punctuation highlight tag 2020-07-15 16:42:47 +02:00
Leander Tentrup
33832d43fc Highlight punctuation as HighlightTag::Operator 2020-07-15 16:40:38 +02:00
bors[bot]
57652fc9d4
Merge #5395
5395: Show fewer syntax errors r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-07-15 14:06:28 +00:00
Aleksey Kladov
0908318171 Show fewer syntax errors 2020-07-15 16:06:04 +02:00
bors[bot]
e0ef6d5c09
Merge #5394
5394: Add missing cancellation point r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-07-15 13:54:04 +00:00
Aleksey Kladov
4c08fc9be3 Cleanup limits 2020-07-15 15:53:33 +02:00
Aleksey Kladov
8baa2b727d Check cancellation when updating imports recursively
For winapi, this takes a lot of CPU time without doing queries and
causes the main event loop to stall on cancellation.
2020-07-15 15:49:20 +02:00
Aleksey Kladov
760ee8173c Micro-optimize update 2020-07-15 15:45:34 +02:00
Jeremy Kolb
21c1504ca9 Move allow list into AssistConfig 2020-07-15 09:45:30 -04:00
bors[bot]
fbdc3c7849
Merge #5390
5390: Don't drop flycheck messages during restart r=matklad a=matklad

closes #5386



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-07-15 12:38:24 +00:00
Aleksey Kladov
a40e05dd5d Don't drop flycheck messages during restart
closes #5386
2020-07-15 14:37:44 +02:00
Jeremy Kolb
6a7d1d4412 Invert condition 2020-07-15 08:17:48 -04:00
Jeremy Kolb
26725fcfbb Fix conversion 2020-07-15 08:17:32 -04:00
bors[bot]
2c67ca0146
Merge #5387
5387: Add --memory-usage to analysis-bench r=matklad a=jonas-schievink



Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2020-07-15 12:07:05 +00:00
Jonas Schievink
9086c8c663 Add --memory-usage to analysis-bench 2020-07-15 12:14:51 +02:00