I'm currently interested in the Language Server Protocol and how to implement it in Vim/Neovim.
hrsh7th / cmp-emoji Goto Github PK
View Code? Open in Web Editor NEWnvim-cmp source for emoji
nvim-cmp source for emoji
I'm currently interested in the Language Server Protocol and how to implement it in Vim/Neovim.
Confirming the emoji inserts the emoji instead of the emoji name even though insert = false
is set. Is there any way to get around that?
I've set up cmp
with this plugin, but emojis don't get inserted when I pick one.
When I type :pa
, I get the autocomplete menu just fine. If I press tab to pick an emoji (e.g.: the panda face), it doesn't insert the emoji, but instead its name (e.g.: :panda_face:
).
Here's my current config:
vim.opt.completeopt = { "menu", "menuone", "noselect" }
require("cmp").setup({
sources = {
{ name = "buffer" },
{ name = "emoji" },
{ name = "nvim_lsp", priority = 100 }, -- Keep LSP results on top.
{ name = "path" },
{ name = "spell" },
{ name = "treesitter" },
{ name = 'nvim_lua' },
},
formatting = {
format = function(entry, vim_item)
-- set a name for each source
vim_item.menu = ({
buffer = "[Buffer]",
emoji = "[Emoji]",
nvim_lsp = "[LSP]",
path = "[Path]",
spell = "[Spell]",
treesitter = "[Treesitter]",
nvim_lua = "[Neovim]",
})[entry.source.name]
return vim_item
end,
},
})
I recently migrated from nvim-compe
, and this was my previous config. On compe, if I pressed tab and picked an emoji, it was inserted just fine.
Maybe previously completion was working due to something I've missed porting?
vim.o.completeopt = "menuone,noselect"
require("compe").setup({
enabled = true,
autocomplete = true,
debug = false,
min_length = 1,
preselect = "disable",
source = {
path = true,
buffer = true,
calc = true,
vsnip = true,
nvim_lsp = true,
nvim_lua = true,
spell = true,
tags = true,
snippets_nvim = true,
treesitter = true,
emoji = true,
},
})
Hi
Wondering if there's new emojis being added? Or plans to add new ones?
I'm manually adding some emojis that I personally use/like but was wondering whether we have anything in progress related to that so I don't work on repeated stuff .. I mean, duplicating work.
Also is there any automated way of adding new ones? For instance reading a font file and importing the icons? Or it's manually as I'm doing?
This is not actually an issue but couldn't find much info out there so submitting this issue / query.
Thanks
Given this file.lua
local str = ':smi
-- ^ cursor
EXPECTED: cmp menu open with ๐ emoji selected
ACTUAL: no cmp menu
I enjoy the plugin, but I also work in a few languages that make frequent use of colons as starting characters for keywords/symbols. What are your thoughts on making an option for the trigger characters?
Hi, ๐
When I type :wave:
, Is there a way to get the default emoji skin?
Thank you for nvim-cmp! ๐จ
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.