vscode-iconify icon indicating copy to clipboard operation
vscode-iconify copied to clipboard

Avoid jumping left and right on focusing on/leaving current line

Open shrekuu opened this issue 1 year ago • 0 comments

Clear and concise description of the problem

I have code like this: <Icon icon="mdi:heart-outline" className="h-5 w-5" />

The icon name shows when I put the cursor on this line, disappears when I move cursor to other lines. The icon image disappears when the name fails to match one icon. The code jumps left and right.

Expected result

I think it would be great of the code does not jump left and right, at least not that much distance when we focus on or leave this line.

Suggested solution

When this plugin is enabled, just keep some space(may be some sign/graph to indicate that no icon matches the icon name) before the icon name literal to show the icon. Or at least always show the icon name, so the line does not shift left and right that much distance when we focus on or leave this line. Maybe adding something we can configure in the settings? Sorry I am not capable of creating a PR.

image

Thanks Anthony Fu. ❤️

Validations

  • [x] Follow our Code of Conduct
  • [X] Read the Contributing Guide.
  • [X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

shrekuu avatar Feb 20 '24 10:02 shrekuu