Coder Social home page Coder Social logo

Comments (10)

yioneko avatar yioneko commented on June 14, 2024 1

Same problem here. I think this is an upstream issue. You can revert to hrsh7th/nvim-cmp@8c08bdf as a temporary workaround. Upstream repo is under refactoring works on async completion, idk whether it's related to this.

from cmp-tabnine.

tzachar avatar tzachar commented on June 14, 2024 1

Thanks @yioneko
@mystilleef Does reverting solves you issue?
If so, can you please open an issue in nvim-cmp?
10x.

from cmp-tabnine.

tzachar avatar tzachar commented on June 14, 2024 1

Fixed by @hrsh7th in hrsh7th/nvim-cmp@753f5b7

from cmp-tabnine.

tzachar avatar tzachar commented on June 14, 2024

Feature, not a bug 😄
Every time you see a .. it means its a snippet. The cursor will be placed where the dots indicate, allowing you to fill in the brackets.
You then need to use Tab to navigate to the end of the snippet.

from cmp-tabnine.

mystilleef avatar mystilleef commented on June 14, 2024

Feature, not a bug smile Every time you see a .. it means its a snippet. The cursor will be placed where the dots indicate, allowing you to fill in the brackets. You then need to use Tab to navigate to the end of the snippet.

Yeah, snippet expansion works pretty well. But in my case, that wasn't a snippet expansion. You can see the completion item order.id} does not have a snippet label or placeholder around it. Like you said, snippets are annotated with .. and ~ to indicate snippet expansion. Or maybe I'm missing something?

from cmp-tabnine.

mystilleef avatar mystilleef commented on June 14, 2024

I've added another video showing the problem. You can see when I select the tabnine completion item, cmpapi"), the cursor does not move to the end of the line. You can also see cmpapi") is not a snippet. I'm having this issue when completion items have closing brackets.

Video

t9bug.mp4

from cmp-tabnine.

mystilleef avatar mystilleef commented on June 14, 2024

Thanks @yioneko @mystilleef Does reverting solves you issue? If so, can you please open an issue in nvim-cmp? 10x.

Yes, reverting solves the issue. I'll open an issue at nvim-cmp. Sorry for the trouble, and thanks for your help.

from cmp-tabnine.

hrsh7th avatar hrsh7th commented on June 14, 2024

I had allowed calling the callback multiple times by requesting from tzachar.

I think it cmp-tabnine issue. I guess the tabnine source returns invalid completion item.

from cmp-tabnine.

tzachar avatar tzachar commented on June 14, 2024

@hrsh7th
This has nothing to do with the callback being called multiple times. This behavior was required for cmp-fuzzy-buffer.

Anyway, if reverting nvim-cmp to an earlier revision fixes the problem, it makes more sense that this is a cmp issue.

@mystilleef
Can you send me the output of :messages after applying the following patch?
This can help debugging the isse:

diff --git a/lua/cmp_tabnine/source.lua b/lua/cmp_tabnine/source.lua
index a3b38d2..6c2c426 100644
--- a/lua/cmp_tabnine/source.lua
+++ b/lua/cmp_tabnine/source.lua
@@ -312,4 +312,13 @@ Source._on_stdout = function(_, data, _)
        Source.callback = nil;
 end

+function dump(...)
+    local objects = vim.tbl_map(vim.inspect, {...})
+    print(unpack(objects))
+end
+function Source:resolve(completion_item, callback)
+ dump(completion_item)
+  callback(completion_item)
+end
+
 return Source

from cmp-tabnine.

tzachar avatar tzachar commented on June 14, 2024

@mystilleef
I bisected the issue to e1f880b7e0ae3cae251fb6c7901bc856fe546e0b in upstream cmp. Please reopen the issue there.

10x.

from cmp-tabnine.

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.