Git Product home page Git Product logo

Comments (8)

tzachar avatar tzachar commented on August 25, 2024

This is not related to this specific plugin, but to your setup in general.
cmp has the following configuration options, which can be set per source, and should help you achieve what you want:
https://github.com/hrsh7th/nvim-cmp/blob/8bbaeda725d5db6e4e1be2867a64b43bf547cf06/doc/cmp.txt#L427
https://github.com/hrsh7th/nvim-cmp/blob/8bbaeda725d5db6e4e1be2867a64b43bf547cf06/doc/cmp.txt#L432

I essence, cmp will query completion sources only if the pattern before the cursor matches keyword_pattern and the pattern is at least completion.keyword_length characters.

from cmp-tabnine.

luiz00martins avatar luiz00martins commented on August 25, 2024
			sources = cmp.config.sources({
				{ name = 'nvim_lsp' },
				{ name = 'luasnip' },
				{
					name = 'cmp_tabnine',
					keyword_length = 0,
					keyword_pattern = '*',
				},
				{ name = 'path' },
				{ name = 'buffer' },
			}),

Now tabnine just doesn't appear. Am I doing something wrong?

from cmp-tabnine.

tzachar avatar tzachar commented on August 25, 2024

you cant use just ''. its not a valid regular expression.
try '.
'

from cmp-tabnine.

luiz00martins avatar luiz00martins commented on August 25, 2024

Yep, that works way better. It still fails at the beginning of the line though, which is one of the most important cases:

image

(Yes, I've scrolled through all of it, Tabnine isn't in the list)

Any idea on why?

from cmp-tabnine.

tzachar avatar tzachar commented on August 25, 2024

I can confirm this does not work. I also tested directly with the tabnine process, and no results are returned when the cursor is on the first column of a new line.

It might be a tabnine bug. Can you try to recreate this using vscode and the tabnine plugin for it?

from cmp-tabnine.

luiz00martins avatar luiz00martins commented on August 25, 2024

Got some slightly different behaviour on VSCode.

Sometimes it works, sometimes it doesn't:
image
image

When it doesn't, and calling Alt+] does nothing. But typing a letter and backspacing makes it work again.

from cmp-tabnine.

tzachar avatar tzachar commented on August 25, 2024

I think this is a bug in tabnine.
Maybe try contacting the tabnine team.

from cmp-tabnine.

luiz00martins avatar luiz00martins commented on August 25, 2024

Sure, will do.

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.