cmp-emoji icon indicating copy to clipboard operation
cmp-emoji copied to clipboard

Does not suggest completions inside lua strings

Open bennypowers opened this issue 2 years ago • 3 comments

Given this file.lua

local str = ':smi
--               ^ cursor

EXPECTED: cmp menu open with 😄 emoji selected ACTUAL: no cmp menu

bennypowers avatar Apr 19 '22 07:04 bennypowers

PR welcome :)

hrsh7th avatar Apr 19 '22 08:04 hrsh7th

my initial thought was that, for certain filetypes, cmp-emoji should use treesitter to find out if we're in a string

bennypowers avatar Apr 19 '22 08:04 bennypowers

I think it does not have anything to do with strings per se, but rather that there needs to be a space before the colon:

":smi|   " -- this does not trigger emoji completions
" :smi|   " -- this does

The problem seems to be that without the space, : is the required trigger character for cmp-emoji, but ": does not trigger it

chrisgrieser avatar Mar 18 '23 21:03 chrisgrieser