nvim-tree/nvim-tree.lua

Cmp activate when creating new file

Act0r1 opened this issue · 2 comments

Description

I use blink.cmp and when i creating new file, i starting get suggestions from cmp, like shown in img.
I try to return to version of nvim_tree: v0.99.0 but it didn't help.

Also try to disabled blink for NvimTree, but is actually didn't help also:

enabled = function()
            local disabled_filetypes = { "NvimTree", "DressingInput" } -- Add extra fileypes you do not want blink enabled.
            return not vim.tbl_contains(disabled_filetypes, vim.bo.filetype)
        end,

Image

blink.version: 0.13.1

Neovim version

NVIM v0.10.4
Build type: Release
LuaJIT 2.1.1741730670

Operating system and version

MacOS

Windows variant

No response

nvim-tree version

v 0.99.0

Clean room replication

return {

    {
        "saghen/blink.cmp",
        -- dependencies = { "rafamadriz/friendly-snippets", "Kaiser-Yang/blink-cmp-avante" },
        dependencies = { "rafamadriz/friendly-snippets" },

        version = "0.13.1",
        cmdline = {},
        enabled = function()
            local disabled_filetypes = { "NvimTree", "DressingInput" } -- Add extra fileypes you do not want blink enabled.
            return not vim.tbl_contains(disabled_filetypes, vim.bo.filetype)
        end,

        opts = {
            cmdline = {
                enabled = false,
            },
            keymap = {
                ["<CR>"] = { "accept", "fallback" },
                ["<Tab>"] = {
                    function(cmp)
                        if cmp.snippet_active() then
                            return cmp.select_next()
                        else
                            return cmp.select_next()
                        end
                    end,
                    "snippet_forward",
                    "fallback",
                },
                ["<S-Tab>"] = { "snippet_backward", "fallback" },
                -- cmdline = {
                --     preset = "none",
                -- },
            },
            sources = {
                -- default = { "avante", "lsp", "path", "snippets", "buffer" },
                default = { "lsp", "path", "snippets", "buffer" },
            },

            appearance = {
                use_nvim_cmp_as_default = true,
                nerd_font_variant = "mono",
            },
            -- snippets = { preset = 'luasnip' },
            signature = { enabled = true },
            -- cmdline = {
            --     default = { "lsp", "path", "snippets", "buffer" },
            --     sources = {},
            -- },
            -- completion.list.selection
            completion = {
                -- list = {
                -- 	preselect = true,
                -- 	-- auto_insert = true,
                -- },
                ghost_text = {
                    enabled = false,
                },
                documentation = { auto_show = true, auto_show_delay_ms = 50 },
                -- documentation = { window = { border = "single" } },
                menu = {
                    auto_show = true,

                    -- nvim-cmp style menu
                    draw = {
                        columns = {
                            { "label",     "label_description", gap = 1 },
                            { "kind_icon", "kind" },
                        },
                    },
                },
            },
        },
    },
}

nvim_tree:
return {
    "nvim-tree/nvim-tree.lua",
    version = "v0.99.0",
    dependencies = { "nvim-tree/nvim-web-devicons" }, -- Optional for file icons
    config = function()
        require("nvim-tree").setup({
            git = {
                -- enable = true,
                ignore = false,
                -- timeout = 500,
            },
            filters = {
                dotfiles = false,
            },
        })
    end,
}

Steps to reproduce

Install blink.cmp version: 0.13.1, install nvim_tree, try to creating new file

Expected behavior

No response

Actual behavior

No response

Please follow bug template and provide minimal reproduction using code snippet from it.

Please follow bug template and provide minimal reproduction using code snippet from it.

i already fix it, it was my fault