fix(#52): Set the colorscheme when lazyloading the plugin #53
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "arnevm123/52-apply-colorscheme-when-lazyloading"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When the plugin gets loaded we call the function first, so VimEnter is not needed anymore.
If you would like to fix this another way, please let me know.
fixes #52
@arnevm123, in my personal opinion the changes of setting the highlight without listening to an event should be done in
init.luasince its not listening to the document itself, then in thedocument_listener.luajust changing it to listen to the eventColorSchemeit's fine.Then we'd have to make a setupColors function in util or a separate file, as the code in your PR is a bit too convoluted to be maintained in 2 places.
I thought the same thing, that's why I said it as an opinion. I mean the code still gets the job done as it is and it's not like it needs to be in the
init.luaor it won't work.There are some users, (e.g. as mentioned in #49 ) who seem to have their own logic involving
require("supermaven-nvim.completion_preview").suggestion_groupand I'm wondering if runningpreview.suggestion_group = "SupermavenSuggestion"would break this setupe: although I suppose that would have been the intended/original effect, and it is only working right now due to this bug
@sm-victorw I tested it and it seems if I have this config:
If
lazy != false and event != ""it will indeed break.If doing what I suggested in https://github.com/supermaven-inc/supermaven-nvim/pull/53#issuecomment-2154582714 it won't break.
@sm-victorw @arnevm123 here is a demo of the changes, first to appear is when setting it initially in
init.lua, second is how the changes are in this PR.https://github.com/supermaven-inc/supermaven-nvim/assets/71392160/266e9b03-ccf4-496b-b5fa-1616561fed1f
One more thing, if doing the same with the PR #51 it will default to
Commentwhen "breaking", if the changes of this PR or the aforementioned one, the first one that gets merged will have to add the "setting a default" at the point of initialising the plugin.whats currently holding up this PR from being merged? currently it seems setting suggestion color is broken with or without lazy loading...
@thesimonho ngl, I think this project's kinda abandoned since they starting exploring doing a code editor and then fused with an existing one.
I'll try to create a repo from this base one and try to maintain it properly.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.