utilyre / barbecue.nvim

Visual Studio Code inspired breadcrumbs plugin for the Neovim editor
MIT License
776 stars 31 forks source link

[BUG]: Unsupported layout_config key for the center strategy: preview_height #55

Closed Integralist closed 1 year ago

Integralist commented 1 year ago

Requirements

Expected Behavior

I execute :Barbecue command with no arguments and it displays a list of command to execute.

Actual Behavior

I get the expected behaviour but I also get a lot of errors (see screenshot).

The error appears to be related to this section of Telescope? https://github.com/nvim-telescope/telescope.nvim/blob/master/lua/telescope/pickers/layout_strategies.lua#L168

Screenshot 2023-01-27 at 16 45 34

Unsupported layout_config key for the center strategy: preview_height
{
  bottom_pane = {
    height = <function 1>,
    preview_cutoff = 1,
    prompt_position = "top"
  },
  center = {
    height = <function 1>,
    preview_cutoff = 1,
    prompt_position = "top",
    width = <function 2>
  },
  cursor = {
    height = <function 1>,
    preview_cutoff = 1,
    width = <function 2>
  },
  height = <function 1>,
  horizontal = {
    height = <function 1>,
    preview_cutoff = 1,
    prompt_position = "bottom",
    width = <function 2>
  },
  preview_cutoff = 1,
  preview_height = 0.7,
  vertical = {
    height = <function 1>,
    preview_cutoff = 1,
    prompt_position = "bottom",
    width = <function 2>
  },
  width = <function 2>
}

Neovim Version

NVIM v0.8.2
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by brew@Ventura-arm64.local

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/opt/homebrew/Cellar/neovim/0.8.2/share/nvim"

Run :checkhealth for more info

Minimal Configuration

local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
  vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({
    "git",
    "clone",
    "--filter=blob:none",
    "--single-branch",
    "https://github.com/folke/lazy.nvim.git",
    lazypath,
  })
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
  -- do not remove the colorscheme!
  "folke/tokyonight.nvim",

  {
    "utilyre/barbecue.nvim",
    dependencies = {
      "neovim/nvim-lspconfig",
      "SmiteshP/nvim-navic",
      "nvim-tree/nvim-web-devicons",
    },
    config = function() 
      require("barbecue").setup()
    end,
  },
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

-- add anything else here
vim.opt.termguicolors = true
-- do not remove the colorscheme!
vim.cmd([[colorscheme tokyonight]])

Reproduction

Sorry I use packer not lazy.nvim and so I was strugging to actually get the folke/noice plugin installed and running without errors and in the end failed to 😬 so unfortunately I can't say for sure what is causing the error.

I actually don't really need to run the Ex command this plugin exposes and so the fact it errors doesn't actually bother me, but I wanted to report it anyway just in case it was affecting other people, but I didn't really want to waste of ton of time. So with that in mind I totally understand if you feel you want to close this issue as the report is incomplete 👍🏻

utilyre commented 1 year ago

I personally use noice+dressing and neovim nightly, but it doesn't seem to throw any errors. So my guess is that there must be a bug in your own config.

Closing this, although feel free to re-open if that's not the case.