rust-analyzer/crates
bors f045f14626 Auto merge of #13084 - Veykril:highlight-config, r=Veykril
Add some more highlighting configurations

The following can be enabled/disabled now in terms of highlighting:
- doc comment injection (enabled by default)
- punctuation highlighting (disabled by default)
- operator highlighting (enabled by default)
- punctuation specialized highlighting (disabled by default)
- operator specialized highlighting (disabled by default)
- macro call bang highlighting (disabled by default)

This PR also changes our `attribute` semantic token type to the `decorator` type which landed upstream (but not yet in lsp-types).

Specialized highlighting is disabled by default, as all clients will have to ship something to map these back to the standard punctuation/operator token (we do this in VSCode via the inheritance mapping for example). This is a lot of maintenance work, and not something every client wants to do, pushing that need to use the user. As this is a rather niche use in the first place this will just be disabled by default.

Punctuation highlighting is disabled by default, punctuation is usually something that can be done by the native syntactic highlighting of the client, so there is no loss in quality. The main reason for this though is that punctuation adds a lot of extra token data that we sent over, a lot of clients struggle with applying this, so disabling this improves the UX for a lot of people. Note that we still highlight punctuations with special meaning as that special entity, (the never type `!` will still be tagged as a builtin type if it occurs as such)

Separate highlighting of the macro call bang `!` is disabled by default, as I think people actually didn't like that change that much, though at the same time I feel like not many people even noticed that change (I prefer it be separate, but that's not enough reason for it to be enabled by default I believe :^) )

cc https://github.com/rust-lang/rust-analyzer/issues/12783 https://github.com/rust-lang/rust-analyzer/issues/13066
2022-08-23 12:39:57 +00:00
..
base-db remove imports that are also in edition 2021's prelude 2022-08-09 01:16:32 +02:00
cfg Run cargo fix --edition-idioms 2022-07-20 15:02:08 +02:00
flycheck Pop an error notification when flycheck can't be restarted 2022-08-22 17:42:33 +02:00
hir Auto merge of #12965 - DesmondWillowbrook:assoc-method-dimming, r=Veykril 2022-08-22 07:20:56 +00:00
hir-def Auto merge of #12965 - DesmondWillowbrook:assoc-method-dimming, r=Veykril 2022-08-22 07:20:56 +00:00
hir-expand Auto merge of #12982 - jridgewell:into_future, r=Veykril 2022-08-18 07:37:47 +00:00
hir-ty Auto merge of #13021 - N3xed:fix-gat-panics, r=flodiebold 2022-08-22 14:00:23 +00:00
ide Add config for macro bang token highlighting, disable by default 2022-08-23 14:05:56 +02:00
ide-assists Do not substitute Self when in same impl block 2022-08-23 01:52:47 -04:00
ide-completion fix: Fix reference autocompletions using incorrect offsets in macro inputs 2022-08-23 14:29:59 +02:00
ide-db Auto merge of #13044 - dzvon:fix-typo, r=Veykril 2022-08-17 14:59:02 +00:00
ide-diagnostics Auto merge of #12965 - DesmondWillowbrook:assoc-method-dimming, r=Veykril 2022-08-22 07:20:56 +00:00
ide-ssr Fix r-a spelling in some places 2022-08-01 13:47:09 +02:00
limit Properly cfg the max field of Limit 2022-07-31 19:27:20 +02:00
mbe fix: a bunch of typos 2022-08-17 21:44:58 +08:00
parser Recover from missing ellipsis in record literals for path expressions 2022-08-09 18:23:25 +02:00
paths Auto merge of #12808 - Veykril:check-workspace, r=Veykril 2022-08-04 12:57:04 +00:00
proc-macro-api remove imports that are also in edition 2021's prelude 2022-08-09 01:16:32 +02:00
proc-macro-srv Replace crossbeam with std's scoped threads 2022-08-22 14:55:13 +02:00
proc-macro-srv-cli Gate and rename binary, use it if it's in the sysroot 2022-07-25 16:22:39 +02:00
proc-macro-test revert nightly rustfmt formatting that accidentally slipped in 2022-07-25 14:18:30 +02:00
profile Run cargo fix --edition-idioms 2022-07-20 15:02:08 +02:00
project-model fix: a bunch of typos 2022-08-17 21:44:58 +08:00
rust-analyzer Use lsp-types DECORATOR token type 2022-08-23 14:06:19 +02:00
sourcegen run stable fmt through rustup 2022-08-06 17:25:02 +03:00
stdx Enable extra warnings required by rust-lang/rust 2022-07-20 15:00:17 +02:00
syntax fix: a bunch of typos 2022-08-17 21:44:58 +08:00
test-utils Implement IntoFuture type inference 2022-08-08 21:05:56 -04:00
text-edit Enable extra warnings required by rust-lang/rust 2022-07-20 15:00:17 +02:00
toolchain Enable extra warnings required by rust-lang/rust 2022-07-20 15:00:17 +02:00
tt Run cargo fix --edition-idioms 2022-07-20 15:02:08 +02:00
vfs fix: a bunch of typos 2022-08-17 21:44:58 +08:00
vfs-notify Bump notify 2022-08-19 21:37:05 +03:00