Open halvarsu opened 11 months ago
This is an interesting PR, b/c there are two approaches here. One of them is the PR that you've submitted, just add a single purpose "toggle" function to magma.
But what if others want to change their image provider or whether or not they copy output automatically, or any other feature controlled by a configuration variable?
Then it might be better to re-write the way the MagmaOptions
class works. Instead of grabbing global values only on load, perhaps we could grab them each time they're needed, or provide a general command: MagmaRefreshOptions
which can then be used by users in a keymap or function.
Agreed, good point! Your approach sounds much better. I had to learn the hard way that this wasn't the way it was working already...
Which then begs the question, why would someone not want global values to be grabbed continuously? Do you have a use case where MagmaRefreshOptions
is a better solution in mind?
I'd imagine b/c this is a remote plugin fetching the config values and storing them is a little more performant.
I'm not 100% sure on that, but it just feels like it would be the case
Does what it says, toggling the automatic output feature. I personally found this to be useful, as automatic output can be either nice or a nuisance depending on the situation/notebook. I'm not sure if there is some other way of achieving this through nvim; this seemed like the easiest solution to me.