Amos Wenger
d5b1ae66c2
Remove check_merge_commits test altogether
...
Rationale: Merge commits will probably end up in
`rust-lang/rust-analyzer` when doing "rust=>ra" syncs anyway.
It could be changed to only check for merge commits in non-sync PRs,
but it's "probably not worth the hassle"
2022-07-20 15:57:14 +02:00
Amos Wenger
c520408731
Allow merge commits when 'in-rust-tree' feature is enabled
...
This adds an `in-rust-tree` feature that will be enabled when
rust-analyzer is built from `rust-lang/rust`. Due to the way
"git subtree" works, that test _will_ find merge commits and
fail, so we simply skip it.
2022-07-20 15:49:40 +02:00
Amos Wenger
8318035726
Fix last few warnings manually
2022-07-20 15:05:02 +02:00
Amos Wenger
816f7fe12a
Run cargo fix --edition-idioms
2022-07-20 15:02:08 +02:00
Amos Wenger
23d25a3094
Enable extra warnings required by rust-lang/rust
2022-07-20 15:00:17 +02:00
Amos Wenger
1b416473a3
Upgrade to expect-test@1.4.0
...
cf. https://github.com/rust-analyzer/expect-test/issues/33
cf. https://github.com/rust-lang/rust/pull/99444#issuecomment-1188844202
2022-07-19 13:00:45 +02:00
Laurențiu Nicola
474f5eafc7
Work around Code bug with empty diagnostics
2022-07-19 07:45:31 +03:00
bors
dc05192e11
Auto merge of #12807 - Veykril:completion-item-details, r=Veykril
...
Add simple support for completion item details
Supercedes https://github.com/rust-lang/rust-analyzer/pull/9891
This doesn't yet really implement anything new, it just adds the scaffolding for the protocol conversion
2022-07-18 17:28:43 +00:00
Lukas Wirth
d17a5ef8e1
Add simple support for completion item details
2022-07-18 19:27:54 +02:00
bors
fac6a64656
Auto merge of #12804 - jonas-schievink:config-watcher, r=Veykril
...
fix: make file watcher config a drop-down (and clarify the options)
Fixes https://github.com/rust-lang/rust-analyzer/issues/12794
Also renames "notify" to "server", since that's clearer ("notify" is still accepted for compatibility).
2022-07-18 16:41:26 +00:00
bors
22e53f1d33
Auto merge of #12549 - bitgaoshu:goto_where_trait_m_impl, r=Veykril
...
feat: Go to implementation of trait methods
try goto where the trait method implies, #4558
2022-07-18 16:29:23 +00:00
Jonas Schievink
ec1142c0d0
Improve file watcher config
2022-07-18 17:50:56 +02:00
TonalidadeHidrica
dfcbed09d3
Fix obsolete enableRangeFormatting
config
2022-07-11 16:52:35 +09:00
Jonas Schievink
6c6ae965ba
Update remaining GitHub URLs
2022-07-08 15:44:49 +02:00
Hongxu Xu
441e659aa1
Complete associated type only in trait generic arg
...
Fix tidy check does not work for marks in multiline
2022-07-05 21:48:28 +08:00
Florian Diebold
ccf854bc2e
Improve documentation for buildScripts.overrideCommand / checkOnSave.overrideCommand
2022-07-04 18:51:18 +02:00
Laurențiu Nicola
5381811368
Bump tracing-subscriber
2022-07-03 10:12:58 +03:00
Laurențiu Nicola
212f84ab46
Bump crossbeam-channel
2022-07-03 09:56:58 +03:00
Florian Diebold
8b3ec12aac
fix: Report proc macro errors in expressions correctly as well
...
They didn't have a krate before, resulting in the generic "proc macro
not found" error.
Also improve error messages a bit more.
2022-06-28 10:43:22 +02:00
buffet
45b896002a
Fix typo in build.rs
2022-06-26 10:09:45 +00:00
bitgaoshu
e3b1303c4f
fix test in resolve_proc_macro: Foo is Owner
2022-06-25 01:02:39 +08:00
Lukas Wirth
06ee4d6222
fix: Fix auto-ref completions inserting into wrong locations
2022-06-20 18:59:57 +02:00
harpsword
3a78cc5e67
feat: add fold range for multi line match arm list
2022-06-18 16:05:56 +08:00
Lukas Wirth
7d51fc4640
Show proc-macro loading errors in unresolved-proc-macro diagnostics
2022-06-15 17:34:01 +02:00
bors
15c63c4119
Auto merge of #12541 - Veykril:vs-reload, r=Veykril
...
fix: Clear proc-macro changed flag when reloading workspace
2022-06-15 12:29:34 +00:00
Lukas Wirth
664a751f2b
fix: Clear proc-macro changed flag when reloading workspace
2022-06-15 14:29:13 +02:00
Lukas Wirth
325ceaef19
fix: Check for the correct proc-macro settings in missing proc-macro diagnostics
2022-06-14 11:00:06 +02:00
bors
366bd7242e
Auto merge of #12515 - Veykril:rustc-proc-macros, r=Veykril
...
fix: Pass the build data to rustc_private crates
With this all proc-macros should resolve in rustc now when setting up the build script running command properly.
2022-06-12 17:35:55 +00:00
Lukas Wirth
10e9f47dce
fix: Pass the build data to rustc_private crates
2022-06-12 19:29:45 +02:00
Lukas Wirth
0e4eb647f6
More precise proc-macro errors
2022-06-12 18:44:46 +02:00
bors
604b1c8409
Auto merge of #12508 - Veykril:req-retry, r=Veykril
...
fix: Don't respond to cancelled requests when retrying them
Fixes https://github.com/rust-lang/rust-analyzer/issues/12482
2022-06-12 00:56:52 +00:00
Lukas Wirth
ad109f7f0a
fix: Don't respond to cancelled requests when retrying them
2022-06-12 02:56:19 +02:00
Lukas Wirth
a7a1a83463
fix: Fix config patching for callable snippets
2022-06-11 13:41:06 +02:00
bors
ba329913fa
Auto merge of #12449 - Veykril:version, r=Veykril
...
Bring the version command output in line with other rust tools
Inspired by how cargo handles it
Fixes https://github.com/rust-lang/rust-analyzer/issues/12280
![image](https://user-images.githubusercontent.com/3757771/171680176-236451ee-2c6c-449f-8aa5-4a047e8cc907.png )
2022-06-10 23:35:38 +00:00
bors
e9d3fe0484
Auto merge of #12502 - Veykril:deps, r=Veykril
...
internal: Bump Dependencies
2022-06-10 19:51:04 +00:00
Lukas Wirth
76ae5434fa
internal: Bump Dependencies
2022-06-10 17:30:02 +02:00
bjorn3
c81608c6d2
Fix a couple of weak warnings found by rust-analyzer itself
2022-06-08 14:35:11 +00:00
bors
6d3396a492
Auto merge of #12466 - lnicola:worker-thread-stack, r=lnicola
...
Increase worker thread stack and name them
CC #11370
2022-06-05 07:59:42 +00:00
Lukas Wirth
d38b7b88c6
minor: Don't log cancelled diagnostics
2022-06-05 01:38:46 +02:00
Laurențiu Nicola
0b9cd8a468
Increase worker thread stack and name them
2022-06-04 20:48:51 +03:00
Laurențiu Nicola
7066b8e0ca
Shorten main thread name
2022-06-03 07:27:48 +03:00
Lukas Wirth
a2a3ea86ea
Bring the version command output in line with other rust tools
2022-06-02 18:36:02 +02:00
bors
6f7c5589ab
Auto merge of #12443 - Veykril:fmtfix, r=Veykril
...
minor: Fix rustfmt failing on main_loop.rs
2022-06-01 19:23:22 +00:00
Lukas Wirth
343562c54d
minor: Fix rustfmt failing on main_loop.rs
2022-06-01 21:20:54 +02:00
Maan2003
bad931116e
fix(diagnostic): Don't remove diagnostic with empty message
...
Use " " as message if it is empty
2022-06-01 18:38:53 +05:30
Lukas Wirth
d88ae66ed9
Sync handlers cannot be cancelled
2022-06-01 12:18:15 +02:00
Lukas Wirth
e2da967578
fix: Fix completions disappearing when typing two keys in quick succession
2022-06-01 00:20:47 +02:00
Lukas Wirth
ea594c4c44
Use char for trigger character
2022-05-30 14:17:58 +02:00
bors
9ceaff91d3
Auto merge of #12406 - harpsword:fix-add-inlayHints-closures-without-block, r=Veykril
...
fix: add an option to show inlay hint for return type of closures wit…
fix #12321
2022-05-30 11:36:55 +00:00
yue4u
1b5f0462ed
fix: visibility completion
2022-05-30 00:06:48 +09:00
harpsword
55509548e8
fix: add an option to show inlay hint for return type of closures without block
2022-05-28 22:12:30 +08:00
bors
145bad473d
Auto merge of #12341 - vemoo:exclude_dirs, r=Veykril
...
make `files.excludeDirs` work
There's a small issue because if all projects are excluded, this: 01d412f4d7/crates/rust-analyzer/src/main_loop.rs (L114)
will be shown.
I thought about not showing it if `files.excludeDirs` is set, but that is not necessarily correct.
Fixes #7755
2022-05-27 12:35:48 +00:00
Lukas Wirth
5410ace1fe
fix: Clear native diagnostics for files when they are deleted
2022-05-25 15:47:41 +02:00
Lukas Wirth
f02c915eb5
internal: Make autoclosing angle brackets configurable, disabled by default
2022-05-25 12:42:07 +02:00
DQ
f3a5475082
Keep the other is
in reload.rs
docs
2022-05-23 10:29:03 +02:00
DQ
914ff6a395
Fix typo in new reload.rs
docs
...
Just skimmed today's changelog and came across the repetition
2022-05-23 09:35:32 +02:00
Felicián Németh
3bb02f2329
feat: Add on-typing handler for left angle
...
Only advertise this feature in the server capabilities when the client
supports SnippetTextEdit.
Close #11398 .
Co-authored-by: unexge <unexge@gmail.com>
2022-05-22 10:40:37 +02:00
Felicián Németh
636d4880c4
internal: Allow OnTypeFormatting to send SnippetTextEdit
...
But continue to send TextEdit only.
2022-05-22 10:39:18 +02:00
Bernardo Uriarte
1ee8fefcff
take into account excludeDirs when computing linked_projects
2022-05-21 16:18:55 +02:00
Bernardo Uriarte
7009e5ab35
add failing test
2022-05-21 16:11:51 +02:00
Aleksey Kladov
cbdab0e647
internal: document overall approach to reload
2022-05-21 13:11:05 +01:00
Jonas Schievink
3e356c1fd3
Clear cargo check
diagnostics when flycheck is turned off
2022-05-20 15:07:55 +02:00
bors
41388bf81a
Auto merge of #12263 - andylizi:hide-type-hint-closure, r=Veykril
...
feat: hide type inlay hints for initializations of closures
![hide_closure_initialization](https://user-images.githubusercontent.com/12008103/168470158-6cb77b18-068e-4431-a8b5-e2b22d50d263.gif )
This PR adds an option to hide the inlay hints for `let IDENT_PAT = CLOSURE_EXPR;`, which is a somewhat common coding pattern. Currently the inlay hints for the assigned variable and the closure expression itself are both displayed, making it rather repetitive.
In order to be consistent with closure return type hints, only closures with block bodies will be hid by this option.
Personally I'd feel comfortable making it always enabled (or at least when closure return type hints are enabled), but considering the precedent set in #10761 , I introduced an off-by-default option for this.
changelog feature: option to hide type inlay hints for initializations of closures
2022-05-20 12:35:36 +00:00
bors
f5229cebb2
Auto merge of #12301 - harpsword:fix_for_crlf_cargo_range_map, r=jonas-schievink
...
fix: calculate correct postion for Dos line ending in mapping rustc range to ls…
fix #12293
2022-05-20 12:15:22 +00:00
andylizi
2b1c1a934c
feat: hide type inlay hints for initializations of closures
2022-05-20 17:42:56 +08:00
bors
eba26af9f1
Auto merge of #12314 - jonas-schievink:proc-macro-load, r=jonas-schievink
...
minor: simplify
2022-05-19 14:50:08 +00:00
bors
46b5483055
Auto merge of #12313 - equinox:typo-fix, r=lnicola
...
Removed duplicate 'to' in `cachePriming.numThreads` option description
One 'to' too many!
2022-05-19 14:22:09 +00:00
Equinox
7197042ac4
remove duplicate 'to' in cachePriming.numThreads
option description
2022-05-20 02:05:48 +12:00
Jonas Schievink
b2779111b4
simplify
2022-05-19 15:29:35 +02:00
Lukas Wirth
b08bbd7be0
Enable hovering function parameter inlay hints
2022-05-19 14:32:40 +02:00
Lukas Wirth
74230e26ff
internal: Improve inlay hint tooltips
2022-05-19 13:38:37 +02:00
Jonas Schievink
93b62dbe85
Improve docs generation assist
2022-05-18 18:05:21 +02:00
harpsword
dfae0a12ef
fix: calculate right range for Dos line ending in mapping rustc range to lsp range
2022-05-18 21:08:18 +08:00
Lukas Wirth
21f37a6d9e
Allow inlay hint tooltips to trigger hovers
2022-05-17 14:46:43 +02:00
Lukas Wirth
a2ec010185
Trigger hover requests on closing brace hints
2022-05-17 13:39:45 +02:00
Lukas Wirth
0756719a30
Replace some SmolStr usages with String as the conversion happens anyways
2022-05-17 12:56:14 +02:00
Lukas Wirth
91833f1974
feat: Implement inlay hint tooltips
2022-05-17 12:49:51 +02:00
Jonas Schievink
5ee028bbb8
Fix signature help LSP offset conversion
2022-05-16 15:48:38 +02:00
Jonas Schievink
867a7dc7a0
Show inlay hints after a }
to indicate the closed item
2022-05-16 14:55:47 +02:00
Aleksey Kladov
2f3453994a
minor: rename
2022-05-16 12:42:48 +01:00
bors
1dc25e51a0
Auto merge of #12253 - Veykril:bm, r=Veykril
...
feat: Add binding mode inlay hints
![image](https://user-images.githubusercontent.com/3757771/168427387-2f299438-a0cc-496b-a9a5-d689ef6a2b55.png )
2022-05-16 11:16:22 +00:00
bors
fa133d065b
Auto merge of #12190 - harpsword:fix_diagostics_map_incorrectly, r=harpsword
...
fix cargo check diagnostics are mapped incorrectly with non-BMP codepoints
fix #11945
2022-05-15 09:48:51 +00:00
bors
1ff5b2cab4
Auto merge of #12251 - matklad:lsp-server, r=matklad
...
internal: vendor lsp-server
2022-05-14 20:20:01 +00:00
Aleksey Kladov
57cb65bb7a
internal: vendor lsp-server
2022-05-14 21:15:43 +01:00
Lukas Wirth
6b696fced8
feat: Add binding mode inlay hints
2022-05-14 14:58:35 +02:00
Lukas Wirth
622defb373
internal: Make VSCode config more GUI edit friendly
2022-05-14 13:53:41 +02:00
harpsword
7bd4c11e13
fix diagnostics location map incorrectly from rustc span to lsp position for non-BMP char
2022-05-14 19:19:55 +08:00
Lukas Wirth
8ac429dad9
fix: Fix incorrect hover actions config keys
2022-05-13 21:17:03 +02:00
Lukas Wirth
3577c44dee
fix: Fix fill-arguments completions not working
2022-05-13 19:52:44 +02:00
Lukas Wirth
d57beac7e6
fix: Fix vscode config descriptions not recognizing all valid values
2022-05-12 18:15:48 +02:00
Lukas Wirth
252ffbf77a
fix: Fix old config patching overwriting callable snippet config unconditionally
2022-05-12 17:55:25 +02:00
bors
135164f547
Auto merge of #12226 - Veykril:reborrow-inlay-hints, r=Veykril
...
feat: Allow reborrow inlay hints to be restricted to mutable reborrows only
2022-05-12 12:21:06 +00:00
Lukas Wirth
c2190ad87c
feat: Allow reborrow inlay hints to be restricted to mutable reborrows only
2022-05-12 14:00:06 +02:00
bors
5901dfdf1b
Auto merge of #12224 - Veykril:anno-redundant, r=Veykril
...
internal: Remove redundant offset data in annotations
cc https://github.com/rust-lang/rust-analyzer/issues/12221
2022-05-12 11:31:11 +00:00
Lukas Wirth
ca46c68b04
internal: Remove redundant offset data in annotations
2022-05-12 13:06:49 +02:00
Lukas Wirth
84176f6b24
internal: Rename primeCaches config keys
2022-05-12 12:30:00 +02:00
bors
94fa8a6534
Auto merge of #12213 - Veykril:config-fix, r=Veykril
...
fix: Fix incorrect config patching for runBuildScripts
2022-05-11 10:38:56 +00:00
Lukas Wirth
e68352a9f5
fix: Fix incorrect config patching for runBuildScripts
2022-05-11 12:38:21 +02:00
Elliot Roberts
2298a76222
fix typo in inlayHints.renderColons
option description
2022-05-10 19:15:07 -07:00
Lukas Wirth
b271ef8fd1
fix: Fix config patching failing when appending suffixes
2022-05-10 21:14:22 +02:00