imliam / vscode-inline-parameters

An extension for Visual Studio Code that adds inline parameter annotations when calling a function.
https://marketplace.visualstudio.com/items?itemName=liamhammett.inline-parameters
MIT License
197 stars 21 forks source link

Allow for customizable background #27

Closed williamleiby closed 4 years ago

williamleiby commented 4 years ago

The extension is great as it takes inspiration from the great inlay hints IntelliJ and other JetBrains products offer, but it would be great to see a setting that would look like this:

"inline-parameters.backgroundColor": "#123456",

You could pass hex code values or rgb/rgba values along with false if you wanted a transparent background as well!

This would alter the background color behind the text of the inlay hints. I'm currently using a One Dark Pro theme and this is what the hinting looks like:

Axios Inline Parameter

The idea would be to alter the coloring behind url:

imliam commented 4 years ago

Does the inlineparameters.annotationBackground theme setting not already do this as you want?

williamleiby commented 4 years ago

Here is what I am getting when I try to implement the setting as you described: new-screenshot 2020-08-28 at 10 27 54 AM

new-screenshot 2020-08-28 at 10 29 36 AM

The only difference between these two photos is the dash separating inline and parameters in as the JSON key as all other settings keys are typed as inline-parameters in place of inlineparameters.

imliam commented 4 years ago

That's not what the only difference should be. As this extension's readme says, it is not a setting, it is a themeable colour customisation and needs to go within a workbench.ColorCustomizations object. For example:


  "workbench.colorCustomizations": {
    "inlineparameters.annotationBackground": "#ff0000"
  }

I've just tested that still works on the latest version myself and it does, so I'm going to mark this as closed. Let me know if you have any problems getting that working.