So I am making a svelte action which takes an object as options. You can pass Codemirror themes and extensions to it as well.
usage looks like this:
Now, everytime I pass it a new
value, it reconfigures the extension. That causes an autocomplete flicker which is annoying. The autocomplete never stays open even if I stop typing, it flickers only on typing and disappears after a few milliseconds.
I tried to use lodash.isEqual to compare all the properties other than
value, but for some reason, it always returns false, which makes me think the extensions or themes have some thing to do with screwing up lodash-isEqual.
Is there a way this flicker can be avoided? Or you know a library which can help me check whether only the value changed and nothing else?