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

First suggestion is auto generated snippet from emmet_ls

Open mokorana opened this issue 1 year ago • 1 comments

FAQ

  • [X] I have checked the FAQ and it didn't resolve my problem.

Announcement

Minimal reproducible full config

{
    "neovim/nvim-lspconfig",
    opts = {
      servers = {
        emmet_ls = {
          filetypes = {
            "php",
            "html",
            "css",
          },
        },
      },
    },
}

Description

As soon as I start typing e.g. "d" the popup shows d~ [] Snippet -> <d>${1}</d>. Of course this happens with all kinds of characters until it has a first match with a "keyword", "functio" etc. I could nail it down so far that I am quite confident that it comes from emmet_ls and also only happens if nvim_lsp is a source. It happens in all filetypes where emmet_ls is activated.

Steps to reproduce

Add this to LazyVim

Expected behavior

I only want emmet_ls show up, if it has a match e.g. it found "div". Or I could also live if I have to trigger the excecution of emmet-ls with another key.

Actual behavior

Always triggering nonsense which is specially annoying when I am typing and then press ENTER because then I get a crazy custom html tag.

Additional context

No response

mokorana avatar Dec 04 '24 21:12 mokorana

I have many quesitons

  • is there any way to control whats included in nvim_cmp?
  • is there way to exclude the emmet_ls from it someone showed me this but this doesn't seem to work
sources = cmp.config.sources({
                {
                    name = 'nvim_lsp',
                    entry_filter = function(entry, ctx)
                        return entry.source.name ~= 'emmet_ls'
                    end
                },
                { name = 'luasnip', max_item_count = 5 },
                { name = 'buffer' },
                { name = 'path' },
            }),
  • is this issue from emmet_ls or nvim-cmp ? why emmet_ls is on top?

kalpesh172000 avatar Jan 09 '25 13:01 kalpesh172000