alefragnani / vscode-bookmarks

Bookmarks Extension for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=alefragnani.Bookmarks
GNU General Public License v3.0
1.7k stars 163 forks source link

[FEATURE] - Use vscode-style default bookmark #431

Closed ghost closed 3 years ago

ghost commented 3 years ago

The default blue bookmark is simple, BUT it looks 👀 when I'm using a dark theme. It seems tree icons also custom SVG?

Since this extension was published, there is now ThemeIcon and $(icon) label so use native codicons in extension?

alefragnani commented 3 years ago

Hi @4086606 ,

Are you talking about the icon in the editor (which you see in the gutter) or the one in the Side Bar (Treeview)? VS Code only supports codicon in the Side Bar, not the Editor

BTW, I guess it is the Side Bar, right? 😄

ghost commented 3 years ago

Please a nice clean icon for both, to be consistent :) If no codicon in editor gutter, then we can add custom vscode style icon:


L: dark variant icon. R: light variant icon.

What do you think?


We need DecorationRenderOptions object in createTextEditorDecorationType call

alefragnani commented 3 years ago

You "could" replace the icon in editor gutter up until the latest VS Code release, using the bookmarks.gutterIconPath setting. But in the latest release, VS Code is blocking extensions from loading resources outside its sandbox, which is part of their sandboxing effort (tracked in #411).

I'm still not sure I'll create a workaround for this, or simply remove the setting 😞

ghost commented 3 years ago

Are you open to changing the blue icon in extension? Replacing it with the border icon in my screenshots?

I can open a PR if you're okay with the change.

If not can we have a light and dark gutterIconPath in your replacement?

alefragnani commented 3 years ago

Hi @4086606 ,

Thanks for your interest, but no, at the moment.

About the icon, if the bookmarks.gutterIconPath will be really blocked by VS Code API, I'll probably use something like I did on my other Numbered Bookmarks extension, where the user can decides the color of the icon and the SVG is created dynamically. Will see how it goes.

ghost commented 3 years ago

Sounds good, in the meantime I can locally modify the extension