diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-08-26 14:07:06 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-08-26 14:07:06 +0100 |
commit | d58a3a277a1778ec33e492e958b52869510c1239 (patch) | |
tree | 101d27b02d5671aa6bd9f242be26281f13350f6c /editors/code/package.json | |
parent | ad60b4e6ea1cbbb4c611f56833af90b43c4a5a3e (diff) | |
parent | 5b9a882edc20810641cb774240e5089e87dab82e (diff) |
Merge #5885
5885: Make inlay hints colors more configurable r=matklad a=Veetaha
**[BREAKING CHANGE]**
Tackles https://github.com/rust-analyzer/rust-analyzer/issues/5337#issuecomment-680018601 and generally related to #5337.
Added `foreground/background` color configurations with optional more specific overrides `foreground.(type|parameter|chaining)Hints`.
One problem I see is that the config keys are long and don't fit into the on-hover hints in the `settings.json` file entirely...
<details>
<summary>Demo</summary>
![demo](https://user-images.githubusercontent.com/36276403/91238334-77fc3b00-e745-11ea-836b-2822015ece98.gif)
</details>
Co-authored-by: Veetaha <[email protected]>
Diffstat (limited to 'editors/code/package.json')
-rw-r--r-- | editors/code/package.json | 67 |
1 files changed, 65 insertions, 2 deletions
diff --git a/editors/code/package.json b/editors/code/package.json index f079f73b8..93d94ed12 100644 --- a/editors/code/package.json +++ b/editors/code/package.json | |||
@@ -712,8 +712,8 @@ | |||
712 | ], | 712 | ], |
713 | "colors": [ | 713 | "colors": [ |
714 | { | 714 | { |
715 | "id": "rust_analyzer.inlayHint", | 715 | "id": "rust_analyzer.inlayHints.foreground", |
716 | "description": "Color for inlay hints", | 716 | "description": "Foreground color of inlay hints (is overriden by more specific rust_analyzer.inlayHints.foreground.* configurations)", |
717 | "defaults": { | 717 | "defaults": { |
718 | "dark": "#A0A0A0F0", | 718 | "dark": "#A0A0A0F0", |
719 | "light": "#747474", | 719 | "light": "#747474", |
@@ -721,6 +721,69 @@ | |||
721 | } | 721 | } |
722 | }, | 722 | }, |
723 | { | 723 | { |
724 | "id": "rust_analyzer.inlayHints.background", | ||
725 | "description": "Background color of inlay hints (is overriden by more specific rust_analyzer.inlayHints.background.* configurations)", | ||
726 | "defaults": { | ||
727 | "dark": "#11223300", | ||
728 | "light": "#11223300", | ||
729 | "highContrast": "#11223300" | ||
730 | } | ||
731 | }, | ||
732 | { | ||
733 | "id": "rust_analyzer.inlayHints.foreground.typeHints", | ||
734 | "description": "Foreground color of inlay type hints for variables (overrides rust_analyzer.inlayHints.foreground)", | ||
735 | "defaults": { | ||
736 | "dark": "rust_analyzer.inlayHints.foreground", | ||
737 | "light": "rust_analyzer.inlayHints.foreground", | ||
738 | "highContrast": "rust_analyzer.inlayHints.foreground" | ||
739 | } | ||
740 | }, | ||
741 | { | ||
742 | "id": "rust_analyzer.inlayHints.foreground.chainingHints", | ||
743 | "description": "Foreground color of inlay type hints for method chains (overrides rust_analyzer.inlayHints.foreground)", | ||
744 | "defaults": { | ||
745 | "dark": "rust_analyzer.inlayHints.foreground", | ||
746 | "light": "rust_analyzer.inlayHints.foreground", | ||
747 | "highContrast": "rust_analyzer.inlayHints.foreground" | ||
748 | } | ||
749 | }, | ||
750 | { | ||
751 | "id": "rust_analyzer.inlayHints.foreground.parameterHints", | ||
752 | "description": "Foreground color of function parameter name inlay hints at the call site (overrides rust_analyzer.inlayHints.foreground)", | ||
753 | "defaults": { | ||
754 | "dark": "rust_analyzer.inlayHints.foreground", | ||
755 | "light": "rust_analyzer.inlayHints.foreground", | ||
756 | "highContrast": "rust_analyzer.inlayHints.foreground" | ||
757 | } | ||
758 | }, | ||
759 | { | ||
760 | "id": "rust_analyzer.inlayHints.background.typeHints", | ||
761 | "description": "Background color of inlay type hints for variables (overrides rust_analyzer.inlayHints.background)", | ||
762 | "defaults": { | ||
763 | "dark": "rust_analyzer.inlayHints.background", | ||
764 | "light": "rust_analyzer.inlayHints.background", | ||
765 | "highContrast": "rust_analyzer.inlayHints.background" | ||
766 | } | ||
767 | }, | ||
768 | { | ||
769 | "id": "rust_analyzer.inlayHints.background.chainingHints", | ||
770 | "description": "Background color of inlay type hints for method chains (overrides rust_analyzer.inlayHints.background)", | ||
771 | "defaults": { | ||
772 | "dark": "rust_analyzer.inlayHints.background", | ||
773 | "light": "rust_analyzer.inlayHints.background", | ||
774 | "highContrast": "rust_analyzer.inlayHints.background" | ||
775 | } | ||
776 | }, | ||
777 | { | ||
778 | "id": "rust_analyzer.inlayHints.background.parameterHints", | ||
779 | "description": "Background color of function parameter name inlay hints at the call site (overrides rust_analyzer.inlayHints.background)", | ||
780 | "defaults": { | ||
781 | "dark": "rust_analyzer.inlayHints.background", | ||
782 | "light": "rust_analyzer.inlayHints.background", | ||
783 | "highContrast": "rust_analyzer.inlayHints.background" | ||
784 | } | ||
785 | }, | ||
786 | { | ||
724 | "id": "rust_analyzer.syntaxTreeBorder", | 787 | "id": "rust_analyzer.syntaxTreeBorder", |
725 | "description": "Color of the border displayed in the Rust source code for the selected syntax node (see \"Show Syntax Tree\" command)", | 788 | "description": "Color of the border displayed in the Rust source code for the selected syntax node (see \"Show Syntax Tree\" command)", |
726 | "defaults": { | 789 | "defaults": { |