'Monaco: saving preferences to localStorage

In the editor you can resize the completions dropdown with a drag handle - this is important to me because the completion items can have wildly different widths.

The new width persists for the duration of that editor, but if you reload the page it's reset to the default.

I can implement this interface as suggested on https://github.com/microsoft/monaco-editor/issues/2241#issuecomment-764694521. However I would like to just rely on the default implementation but simply persist all settings to localStorage. It seems like that would be such a common case that there would be a simpler way of doing this without reimplementing storage.ts.

Is there a way of delegating to the default impl, or adding a listener for changes without overriding the default impl?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source