supermaven-inc / supermaven-nvim

The official Neovim plugin for Supermaven
https://supermaven.com/
MIT License
279 stars 16 forks source link

feat(#49): exposing `suggestion_group` in config settings #51

Open AlejandroSuero opened 4 weeks ago

AlejandroSuero commented 4 weeks ago

With this changes suggestion_group will be exposed to the config under config.color like:

require("supermaven-nvim").setup({
  color = {
    suggestion_group = "Comment",
  },
})

Allowing users to change it in an easier way.


https://github.com/supermaven-inc/supermaven-nvim/assets/71392160/1fc06cc3-79ce-49c3-84cd-50bb3ca49692

Closes #49.

AlejandroSuero commented 4 weeks ago

@sm-victorw @super-jacob When discussing the behaviour on #49 about how SupermavenSuggestion highlight group is set. I tested out using lazy.nvim changing it from lazy = false to event = "VeryLazy" and here are the results:

https://github.com/supermaven-inc/supermaven-nvim/assets/71392160/c4b1df43-2cdd-462c-a64d-b943aac4fa4a

Should I change this behaviour to create the group SupermavenSuggestion when loading the plugin in this PR, or create another PR with those changes?

EDIT:

Apparently @arnevm123 has created one PR solving this in #53.

AlejandroSuero commented 4 weeks ago

@sm-victorw @super-jacob the changes will be the following:

Delete setting SupermavenSuggestion group in document_listener.lua on VimEnter and left only on ColorSchem event.

And set SupermavenSuggestion group in init.lua in M.setup(args) function without creating an autocmd on events.