ayamir / nvimdots

A well configured and structured Neovim.
BSD 3-Clause "New" or "Revised" License
2.82k stars 450 forks source link

e file #1209

Closed mjkx5 closed 3 months ago

mjkx5 commented 3 months ago

Feature description

when I input :e file, It is not content my expected. Screenshot_25-Mar_07-25-13_14664 Screenshot_25-Mar_07-26-25_19618

Additional information

No response

mjkx5 commented 3 months ago

the first picture is 1da8891, the scond picture is bc02854. bc02854 is my expected cotent which have difference between file and directory.

mjkx5 commented 3 months ago

It appears 61c817fd3e20c426a327314a8d3574f2361e6b80

  1. gelguy/wilder.nvim to hrsh7th/cmp-cmdline
ayamir commented 3 months ago

we replaced gelguy/wilder.nvim with hrsh7th/cmp-cmdline b/c wilder.nvim is slower and long time no updates. you can readd it.

  1. lua/user/plugins/tool.lua
    tool["gelguy/wilder.nvim"] = {
    lazy = true,
    event = "CmdlineEnter",
    config = require("configs.tool.wilder"),
    dependencies = { "romgrk/fzy-lua-native" },
    }
  2. lua/user/configs/tool/wilder.lua

    return function()
    local wilder = require("wilder")
    local icons = { ui = require("modules.utils.icons").get("ui") }
    
    wilder.set_option("use_python_remote_plugin", 0)
    wilder.set_option("pipeline", {
        wilder.branch(
            wilder.cmdline_pipeline({ use_python = 0, fuzzy = 1, fuzzy_filter = wilder.lua_fzy_filter() }),
            wilder.vim_search_pipeline(),
            {
                wilder.check(function(_, x)
                    return x == ""
                end),
                wilder.history(),
                wilder.result({
                    draw = {
                        function(_, x)
                            return icons.ui.Calendar .. " " .. x
                        end,
                    },
                }),
            }
        ),
    })
    
    local popupmenu_renderer = wilder.popupmenu_renderer(wilder.popupmenu_border_theme({
        border = "rounded",
        highlights = {
            default = "Pmenu",
            border = "PmenuBorder", -- highlight to use for the border
            accent = wilder.make_hl("WilderAccent", "CmpItemAbbr", "CmpItemAbbrMatch"),
        },
        empty_message = wilder.popupmenu_empty_message_with_spinner(),
        highlighter = wilder.lua_fzy_highlighter(),
        left = {
            " ",
            wilder.popupmenu_devicons(),
            wilder.popupmenu_buffer_flags({
                flags = " a + ",
                icons = { ["+"] = icons.ui.Pencil, a = icons.ui.Indicator, h = icons.ui.File },
            }),
        },
        right = {
            " ",
            wilder.popupmenu_scrollbar(),
        },
    }))
    local wildmenu_renderer = wilder.wildmenu_renderer({
        apply_incsearch_fix = false,
        highlighter = wilder.lua_fzy_highlighter(),
        separator = " | ",
        left = { " ", wilder.wildmenu_spinner(), " " },
        right = { " ", wilder.wildmenu_index() },
    })
    wilder.set_option(
        "renderer",
        wilder.renderer_mux({
            [":"] = popupmenu_renderer,
            ["/"] = wildmenu_renderer,
            substitute = wildmenu_renderer,
        })
    )
    
    require("wilder").setup({'modes': [':', '/', '?']})
    end
  3. disable cmp-cmdline in lua/user/settings.lua
    settings["disabled_plugins"] = {
    "hrsh7th/cmp-cmdline",
    }
  4. disable its function in lua/user/configs/cmp.lua
    return function()
    local cmp = require("cmp")
    cmp.setup.cmdline("/", nil)
    cmp.setup.cmdline(":", nil)
    end
mjkx5 commented 3 months ago

It help me, thanks.