vscode-coverage-gutters icon indicating copy to clipboard operation
vscode-coverage-gutters copied to clipboard

Make gutter highlight width customizable

Open richardswesterhof opened this issue 9 months ago • 1 comments

Is your feature request related to a problem? Please describe. Personally I would prefer if the gutter indicators were thinner.

Describe the solution you'd like Making the width customizable (possibly just two settings: "wide" and "thin") would be nice.

Describe alternatives you've considered I tried making a custom svg as suggested in an earlier issue but that does not seem to work anymore.

Additional context None

richardswesterhof avatar Mar 17 '25 15:03 richardswesterhof

@richardswesterhof Thanks for submitting a ticket!

Definitely a useful feature to choose between different sized gutters. When we moved from the old SVG file approach to the dynamic icon generation, we must have not ported the ability to still use your own icon. https://github.com/ryanluker/vscode-coverage-gutters/blob/master/src/extension/config.ts#L74-L92

Definitely pretty easy to expose the height and width as configuration parameters or provide a fixed wide and thin sizing. I wasn't able to adjust the size of the icon in the gutter though... Microsofts vscode extension api might not allow for us to modify this? (@mattseddon do you have any further insights here?) Image

            const svg = '<svg width="16" height="24" viewPort="0 0 16 24" xmlns="http://www.w3.org/2000/svg"><polygon points="8,0 16,0 16,24 8,24" fill="' + colour + '"/></svg>';

            const icon = 'data:image/svg+xml;base64,' + Buffer.from(svg).toString('base64');
            return Uri.parse(icon);
        }
    /**
     * Represents rendering styles for a {@link TextEditorDecorationType text editor decoration}.
     */
    export interface DecorationRenderOptions extends ThemableDecorationRenderOptions {
        /**
         * Should the decoration be rendered also on the whitespace after the line text.
         * Defaults to `false`.
         */
        isWholeLine?: boolean;

        /**
         * Customize the growing behavior of the decoration when edits occur at the edges of the decoration's range.
         * Defaults to `DecorationRangeBehavior.OpenOpen`.
         */
        rangeBehavior?: DecorationRangeBehavior;

        /**
         * The position in the overview ruler where the decoration should be rendered.
         */
        overviewRulerLane?: OverviewRulerLane;

        /**
         * Overwrite options for light themes.
         */
        light?: ThemableDecorationRenderOptions;

        /**
         * Overwrite options for dark themes.
         */
        dark?: ThemableDecorationRenderOptions;
    }

ryanluker avatar Apr 05 '25 17:04 ryanluker

This does not seem to be possible. The gutters have a fixed width, and the icon needs to fill that width. I can't find any options to change the width of the gutter either.

mattseddon avatar Jul 28 '25 05:07 mattseddon

@mattseddon Thanks for the input, I have left this as an upstream issue and closed the ticket (it can be resurrected if the vscode extension api changes in the future!)

ryanluker avatar Aug 10 '25 20:08 ryanluker