Lukas Wirth
61643aca49
Initial config revamp
2022-05-01 19:57:08 +02:00
Jonas Schievink
c6ffffccbd
Allows triggering commands after an assist edit
2022-04-19 18:45:48 +02:00
Laurențiu Nicola
117f902d55
Bump deps
2022-04-17 19:36:08 +03:00
bors[bot]
49847a25ae
Merge #11883
...
11883: fix(ide): move moudle directory when rename r=rainy-me a=rainy-me
fix : #10992
Added `FileSystemEdit::MoveDir` variant for move dirs. Original implemented as recursively move child mod files but had many issues like
1. left empty dir after rename file
2. only affect rust file
3. not performant
so changed to current version
Co-authored-by: rainy-me <github@yue.coffee >
2022-04-12 15:17:00 +00:00
rainy-me
3dd581b97d
fix: move dir on rename mod
2022-04-12 23:01:53 +09:00
Laurențiu Nicola
d3d6267112
Switch to LSP inlay hints
2022-04-08 14:10:24 +03:00
hkalbasi
003a6b74e4
suggest infered type in auto complete
2022-04-03 11:17:33 +04:30
Lukas Wirth
f610e2c2ed
Simplify completion import insertion
2022-04-02 01:42:21 +02:00
bors[bot]
966b692422
Merge #11771
...
11771: feat: Visualize compiler inserted reborrows via inlay hints r=Veykril a=Veykril
Disabled by default.

Closes https://github.com/rust-analyzer/rust-analyzer/issues/11275
Co-authored-by: Lukas Wirth <lukastw97@gmail.com >
2022-03-20 13:47:16 +00:00
Lukas Wirth
37b48ceb8f
feat: Visualize compiler inserted reborrows via inlay hints
2022-03-20 14:38:16 +01:00
bors[bot]
7315d97347
Merge #11755
...
11755: feat: Implement lifetime elision hints r=Veykril a=Veykril
With names on:

With names off:

Co-authored-by: Lukas Wirth <lukastw97@gmail.com >
2022-03-19 19:15:06 +00:00
Jonas Schievink
55d2a25123
Rename call info to "signature help"
...
It is no longer limited to just calls
2022-03-18 20:19:35 +01:00
Lukas Wirth
673e2b1d8f
feat: Implement lifetime elision hints
2022-03-18 18:11:16 +01:00
Lukas Wirth
bd17933c31
feat: Add return type hints for closures with block bodies
2022-03-16 21:25:03 +01:00
Laurențiu Nicola
620411df80
Mark chaining hints as types, since that's what they are
2022-03-16 07:46:09 +02:00
Lukas Wirth
21af9ba4f0
minor: Pad type inlay hints if no colons are requested
2022-03-12 14:08:39 +01:00
Lukas Wirth
119ba82e4b
minor: add missing definitions of lsp_ext::InlayHintLabel
2022-03-12 01:08:33 +01:00
Lukas Wirth
62265ee9cb
fix: Allow configuration of colons in inlay-hints
2022-03-11 21:15:36 +01:00
Laurențiu Nicola
4a6ee4517a
Add back colons around inlay hints
2022-03-08 12:01:02 +02:00
Laurențiu Nicola
8e3057d0a7
Improve inlay hint padding
2022-03-07 19:18:36 +02:00
bors[bot]
49646b71d4
Merge #11445
...
11445: Upstream inlay hints r=lnicola a=lnicola
Closes https://github.com/rust-analyzer/rust-analyzer/issues/2797
Closes https://github.com/rust-analyzer/rust-analyzer/issues/3394 (since now resolve the hints for the range given only, not for the whole document. We don't actually resolve anything due to [hard requirement](https://github.com/rust-analyzer/rust-analyzer/pull/11445#issuecomment-1035227434 ) on label being immutable. Any further heavy actions could go to the `resolve` method that's now available via the official Code API for hints)
Based on `@SomeoneToIgnore's` branch, with a couple of updates:
- I squashed, more or less successfully, the commits on that branch
- downloading the `.d.ts` no longer works, but you can get it manually from https://raw.githubusercontent.com/microsoft/vscode/release/1.64/src/vscode-dts/vscode.proposed.inlayHints.d.ts
- you might need to pass `--enable-proposed-api matklad.rust-analyzer`
- if I'm reading the definition right, `InlayHintKind` needs to be serialized as a number, not string
- this doesn't work anyway -- the client-side gets the hints, but they don't display
Co-authored-by: Kirill Bulatov <mail4score@gmail.com >
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro >
2022-03-07 16:49:12 +00:00
Laurențiu Nicola
26d2e88b04
Fix parameter hint position
2022-03-07 15:24:54 +02:00
Lukas Wirth
5c0aee013e
Fix highlighting of Self
2022-03-05 23:34:37 +01:00
Kirill Bulatov
5de5e450cb
Remove debugging leftovers
2022-03-04 08:08:59 +02:00
Kirill Bulatov
9c0c199e96
Clean up the redundant hints code and config
2022-03-04 07:45:51 +02:00
Laurențiu Nicola
0b69717ab6
Fixes
2022-03-04 07:45:51 +02:00
Laurențiu Nicola
5a49dbd2e0
Update inlay hints for upstream
2022-03-04 07:45:51 +02:00
Kirill Bulatov
55371be807
Add experimental VSCode api
2022-03-04 07:45:51 +02:00
Lukas Wirth
3a525c831f
internal: Handle macro calls better in highlighting
2022-01-02 19:10:10 +01:00
Lukas Wirth
e4f2d0e3a8
Introduce SymbolKind::Derive
2021-12-04 18:18:09 +01:00
Lukas Wirth
642c1eb720
Introduce SymbolKind::Attribute
2021-12-04 18:01:22 +01:00
Lukas Wirth
d174158abc
Rename things: Tool -> ToolModule
2021-12-03 17:15:19 +01:00
Lukas Wirth
d1677f3286
Remove syntax highlighting hack for builtin attrs
2021-12-03 16:54:34 +01:00
vsrs
2f862cd6fe
Fix Plaintext textDocument/hover
2021-10-29 18:23:47 +03:00
Lukas Wirth
3018ffd85e
Refactor ide handling for paths in derive inputs
2021-10-28 16:47:19 +02:00
Lukas Wirth
0468b11de7
Remove CompletionKind in favor of CompletionItemKind
2021-10-27 17:23:43 +02:00
Laurențiu Nicola
edb03ad6f1
Pull in new lsp-types for VS compat
2021-10-18 12:03:49 +03:00
Alex Muscar
41856e2682
fix: make signature info response conform to spec
...
This addreses
https://github.com/rust-analyzer/rust-analyzer/issues/10464 .
This patch picks up `lsp-types` 0.90.1, which serialises the
`SignatureInformation` and `ParameterInformation` with the right casing.
It also adds `activeSignature` field as part of the top-level signature
response. It keeps `activeParameter` at the top-level for backwards
compatibility.
2021-10-11 20:42:16 +01:00
Lukas Wirth
454ecd167c
Make multiple import edits work for completions
2021-10-04 21:44:33 +02:00
Aleksey Kladov
46eb03d99a
internal: use naming that matches intended use-case
2021-10-02 12:18:18 +03:00
lhvy
dbb02370a4
Add semantic token modifier for crate root
2021-10-01 20:52:13 +10:00
lhvy
f713cfb818
Remove unneeded semantic token definition
2021-10-01 01:55:29 +10:00
lhvy
2b3baa8503
Give defaultLibrary semantic token modifier to items from standard library
2021-10-01 01:19:24 +10:00
Aleksey Kladov
2d2c4e7c22
internal: deduplicate
2021-09-04 16:56:23 +03:00
Jake Heinz
2baef17bb1
semantic highlighting: add reference hlmod
2021-07-31 04:42:47 +00:00
Aleksey Kladov
be84f85c1d
feat: gate custom clint-side commands behind capabilities
...
Some features of rust-analyzer requires support for custom commands on
the client side. Specifically, hover & code lens need this.
Stock LSP doesn't have a way for the server to know which client-side
commands are available. For that reason, we historically were just
sending the commands, not worrying whether the client supports then or
not.
That's not really great though, so in this PR we add infrastructure for
the client to explicitly opt-into custom commands, via `extensions`
field of the ClientCapabilities.
To preserve backwards compatability, if the client doesn't set the
field, we assume that it does support all custom commands. In the
future, we'll start treating that case as if the client doesn't support
commands.
So, if you maintain a rust-analyzer client and implement
`rust-analyzer/runSingle` and such, please also advertise this via a
capability.
2021-07-30 19:16:33 +03:00
Aleksey Kladov
8d8c26e6f5
internal: a bit more of cwd safety for flycheck
2021-07-17 18:13:35 +03:00
Aleksey Kladov
a04775060c
simplify
2021-07-11 13:49:38 +03:00
Aleksey Kladov
ddce16a126
drop unused field
2021-07-11 13:48:26 +03:00
Aleksey Kladov
beb81a40eb
simplify
2021-07-11 13:45:58 +03:00