Dynge / gitmoji.nvim

Gitmojis for Neovim
MIT License
16 stars 0 forks source link

Would you accept a PR with the configurable option to select the plain text? #1

Closed mjacobus closed 10 months ago

mjacobus commented 10 months ago

Hey! thank you for this awesome plugin.

Would you be willing to accept a PR where setup takes the option to select the plain text ":bug:" instead of "🐛" ?

image

It may take forever, since I still need to master lua though 😄

Dynge commented 10 months ago

Hi @mjacobus. Very glad to hear you like the plugin.

I thought about adding that feature as well. I think it can be accomplished quite easily by adding an extra option or field to items.lua.

But youre very welcome to share your thoughts on a potential solution.

Thanks a lot.

Dynge commented 10 months ago

@mjacobus I've added the functionality. Please checkout the README to see how to activate the functionality :)

Let me know if theres any trouble with it. Thanks for the suggestion!

mjacobus commented 10 months ago

@Dynge that is so awesome, thank you very much!

It was not very clear to me though, how to set that up. I see by the code I should use complete_as = text, but I am not quite sure where to place it.

Should it be?

  require("gitmoji").setup({
    completion = {
      complete_as = "text"
    }
  })

Or...

require("cmp").setup({
  sources = {
    { 
      name = 'gitmoji',
      opts = {
....
    }
  })
})
Dynge commented 10 months ago
  require("gitmoji").setup({
    completion = {
      complete_as = "text"
    }
  })

This should do it. 😃

Dynge commented 10 months ago

Thanks for the feedback. Ill update the readme to hopefully make it clearer

Dynge commented 10 months ago

Closing the issue - assuming it works for you. 😁

mjacobus commented 10 months ago

You assumed correctly. 😄

Thank you so much 🙇🏻

Dynge commented 10 months ago

Thats good to hear!