ariel-frischer / bmessages.nvim

Bmessages.nvim better :messages window using an auto-updating buffer.
MIT License
43 stars 3 forks source link

It's not an issue, just curious your cool float cmdline #14

Closed flczcy closed 3 months ago

flczcy commented 3 months ago

bmessages.nvim just that I want. Thanks a lot.

I'm very curious your float cmdline:

image
ariel-frischer commented 3 months ago

Hey @flczcy its from this plugin: https://github.com/gelguy/wilder.nvim

Here is my config:

M = {}

local wilder = require "wilder"
local gradient = {
  '#f4468f', '#fd4a85', '#ff507a', '#ff566f', '#ff5e63',
  '#ff6658', '#ff704e', '#ff7a45', '#ff843d', '#ff9036',
  '#f89b31', '#efa72f', '#e6b32e', '#dcbe30', '#d2c934',
  '#c8d43a', '#bfde43', '#b6e84e', '#aff05b'
}

for i, fg in ipairs(gradient) do
  gradient[i] = wilder.make_hl('WilderGradient' .. i, 'Pmenu', { { a = 1 }, { a = 1 }, { foreground = fg } })
end

wilder.setup {
  modes = { ":", "/", "?" },
  next_key = "<Tab>",
  previous_key = "<S-Tab>",
  -- enable_cmdline_enter = true,
  -- accept_key = "<cr>",
  reject_key = "<s-cr>", -- <esc> twice runs the command so lets do this.
}

wilder.set_option("renderer", wilder.wildmenu_renderer { highlighter = wilder.basic_highlighter() })
-- Disable Python remote plugin
wilder.set_option('use_python_remote_plugin', 0)

wilder.set_option('pipeline', {
  wilder.branch(
    wilder.cmdline_pipeline({
      fuzzy = 1,
      fuzzy_filter = wilder.lua_fzy_filter(),
    }),
    wilder.vim_search_pipeline()
  )
})

wilder.set_option('renderer', wilder.renderer_mux({
  [':'] = wilder.popupmenu_renderer(
    wilder.popupmenu_palette_theme({
      -- 'single', 'double', 'rounded' or 'solid'
      -- can also be a list of 8 characters, see :h wilder#popupmenu_palette_theme() for more details
      border = 'rounded',
      max_height = '35%',         -- max height of the palette
      min_height = 0,             -- set to the same as 'max_height' for a fixed height window
      prompt_position = 'bottom', -- 'top' or 'bottom' to set the location of the prompt
      reverse = 0,                -- set to 1 to reverse the order of the list, use in combination with 'prompt_position'
      margin = '10%',             -- move towards bottom 10% of screen
      highlights = {
        gradient = gradient,
      },
      highlighter = wilder.highlighter_with_gradient({
        wilder.lua_fzy_highlighter(),
      }),
      left = { '', wilder.popupmenu_devicons() },
      right = { '', wilder.popupmenu_scrollbar() },
      -- top = { '', wilder.wildmenu_index() },
      -- pumblend = 20,
    })
  ),
  ['/'] = wilder.wildmenu_renderer({
    highlighter = wilder.lua_fzy_highlighter(),
  }),
}))

return M

lazy.nvim config:

  {
    "gelguy/wilder.nvim",
    dependencies = { "romgrk/fzy-lua-native" },
    config = function()
      require "custom.configs.wilder-conf"
    end,
  },