Skip to content

Commit

Permalink
feat(completion): add cmp-emoji completion source
Browse files Browse the repository at this point in the history
  • Loading branch information
mehalter committed Jun 3, 2024
1 parent 4b39843 commit 4b6110e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lua/astrocommunity/completion/cmp-emoji/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# cmp-emoji

nvim-cmp source for emoji

**Repository:** <https://github.com/hrsh7th/cmp-emoji>
9 changes: 9 additions & 0 deletions lua/astrocommunity/completion/cmp-emoji/init.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
return {
"hrsh7th/nvim-cmp",
optional = true,
dependencies = { "kdheepak/cmp-emoji" },
opts = function(_, opts)
if not opts.sources then opts.sources = {} end
table.insert(opts.sources, { name = "emoji", priority = 700 })
end,
}

3 comments on commit 4b6110e

@Sacro
Copy link
Contributor

@Sacro Sacro commented on 4b6110e Jun 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is nvim-cmp marked as optional when it's required for the plugin?

I don't see a recipe for including it

@mehalter
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nvim-cmp is a default plugin. It is basically so if the user wants to quickly disable nvim-cmp this pack doesn't add it back in

@mehalter
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

although there is a copy/paste error here

Please sign in to comment.