tzachar / cmp-tabnine

TabNine plugin for hrsh7th/nvim-cmp
MIT License
286 stars 27 forks source link

Lazy plugin manager #90

Closed Pakrohk closed 1 year ago

Pakrohk commented 1 year ago

How can I use your plugin with the help of lazy.nvim?

I tried to install the plugin in the way that I send below, but I encountered a problem.

{
"tzachar/cmp-tabnine", cmd = "./install.sh" 
        dependencies = "hrsh7th/nvim-cmp",
}
Pakrohk commented 1 year ago

The method you wrote in the readme to use lazy should be modified as follows:

{
    "hrsh7th/nvim-cmp",
    event = "InsertEnter",
    dependencies = {
        { 
        "tzachar/cmp-tabnine", build = "./install.sh" },
        ...
        ...
        },
    config = function()
    ...
    ...
    end,
}

https://github.com/Pakrohk-DotFiles/NvPak/blob/main/lua/plugins.lua#%22hrsh7th/nvim-cmp%22

tzachar commented 1 year ago

Why?

I see no need to supply instructions on how to enable cmp with lazy.

Pakrohk commented 1 year ago

Why? I see no need to supply instructions on how to enable cmp with lazy.

If cmp is not activated correctly, tabnine will also not work properly, please note that this is a tabnine plugin for cmp, not an independent tabnine plugin for neovim.

The way you currently write in readme it cannot enable cmp and tabnine properly. My intention was only to help.

tzachar commented 1 year ago

I don't think I should explain how to install cmp on this repo. And I don't see any issues with the current installation instructions; The instructions show exactly how to install this plugin. Installing cmp is the plugin user's responsibility, and they should consult cmp documentation -- which might change.

Pakrohk commented 1 year ago

I don't think I should explain how to installcmp on this repo. And I don't see any issues with the current installation instructions; The instructions show exactly how to install this plugin. Installing cmp is the plugin user's responsibility, and they should consult cmp documentation -- which might change.

My friend, this is related to the working method of lazy.nvim, not cmp activation, you should use cpm as a prerequisite in the method you wrote, but lazy.nvim does not behave in this way, and this causes problems. Please try to activate tabnine with the method you wrote, you will see for yourself why I sent this to you. I think we have talked about it enough. Anyway, your tabnine is an extra plugin for cmp.