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

Auto format #323

Closed ProtocolLive closed 4 years ago

ProtocolLive commented 4 years ago

There is an error: when I use the Alt + Shift + F shortcut to automatically format the document, the markers go elsewhere or disappear

1 2

alefragnani commented 4 years ago

Hi @ProtocolLive ,

The extension still doesn't support Formatters properly. Sometimes the bookmarks moves, and sometimes, are removed, sorry.

I have added a workaround sometime ago, until the proper support is added. Just set "bookmarks.useWorkaroundForFormatters": true. You can see more details in #118 .

The downside? You lose the Bookmark's sticky behaviour. It means the bookmarks will be tied to the line number, not the line of code. So, if you add new lines above a bookmark, it will not be moved down.

Hope this helps