Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not suggest completions inside lua strings #2

Open
bennypowers opened this issue Apr 19, 2022 · 3 comments · May be fixed by #8
Open

Does not suggest completions inside lua strings #2

bennypowers opened this issue Apr 19, 2022 · 3 comments · May be fixed by #8

Comments

@bennypowers
Copy link

Given this file.lua

local str = ':smi
--               ^ cursor

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

@hrsh7th
Copy link
Owner

hrsh7th commented Apr 19, 2022

PR welcome :)

@bennypowers
Copy link
Author

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

@chrisgrieser
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants