Coder Social home page Coder Social logo

Comments (12)

jimzk avatar jimzk commented on June 12, 2024 3

Hi, any workaround for this problem?

from cmp_luasnip.

saadparwaiz1 avatar saadparwaiz1 commented on June 12, 2024 1

Let me look into this :)

from cmp_luasnip.

L3MON4D3 avatar L3MON4D3 commented on June 12, 2024 1

Mhmm, I guess you'd have to take a look at cmp's issues and find similar ones, maybe see what kind of debugging-steps are taken (is there a quick way to check when the postfix-snippet is overridden?)
Maybe there is some heuristic in cmp to recognize specific items, and postfix-snippets trigger just that (starting with a dot..)

from cmp_luasnip.

pogopaule avatar pogopaule commented on June 12, 2024

I managed to narrow down the probable cause. A postfix snippet not appearing in the list only happens when my tmux or nvim_lsp source is active. So either the tmux/lsp source itself is the problem or that fact that the tmux/lsp source provides many many completion entries.

But what is not explained by the tmux source is the fact that I need to write out the full postfix snippet name to make it appear as a suggestion. This seems to be a problem independent of the "tmux source problem". This problem disappears if luasnip is my only source.

Example: The snippet's name is .log

With only .lo this happens
image

With .log
image

Now I disable all sources expect for luasnip and .l is sufficient to make the snippet appear.
image

from cmp_luasnip.

L3MON4D3 avatar L3MON4D3 commented on June 12, 2024

Oh btw, are you using manual or auto-completion? It works for me with manual, but haven't tried auto

from cmp_luasnip.

pogopaule avatar pogopaule commented on June 12, 2024

@L3MON4D3 What do you mean by auto-completion? I guess I use manual because I have to manually expand snippets and can't recall that I have configured something related to it.

And do you have a nvim_lsp source? Because the bug appears as soon as I activate it.

from cmp_luasnip.

L3MON4D3 avatar L3MON4D3 commented on June 12, 2024

What do you mean by auto-completion?

Oh, just whether it's always on or if you have to press some key to invoke nvim-cmp.

Yup, I have the nvim_lsp-source :/ Are they only not listed with that one, or does any other source do it?

from cmp_luasnip.

pogopaule avatar pogopaule commented on June 12, 2024

It is always on. The cmp list refreshes as I type.

I have these sources. If only luasnip, bufferand path are active --> no problem. If I activate tmux and/or nvim_lsp --> problem.

from cmp_luasnip.

L3MON4D3 avatar L3MON4D3 commented on June 12, 2024

Oh does the order of the sources make a difference?

from cmp_luasnip.

pogopaule avatar pogopaule commented on June 12, 2024

No, that does not matter. I tried a couple of variations.

But what I have noticed again is that the list of suggestions is populated with the postfix snippets for a blink of an eye and then get overridden with the suggestions from other sources.

from cmp_luasnip.

hiberabyss avatar hiberabyss commented on June 12, 2024

May have something to do with keyword_pattern?

For me, postsnip completion worked for vim, while could not work for cpp.

from cmp_luasnip.

L3MON4D3 avatar L3MON4D3 commented on June 12, 2024

Maybe, but it sounds a bit more complicated then that (source and filetype affect postfix snippets showing up, while keyword pattern stays the same the entire time)

from cmp_luasnip.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.