utilyre / barbecue.nvim

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

[BUG]: E539: Illegal character <[> #80

Closed ArtAndreev closed 1 year ago

ArtAndreev commented 1 year ago

Requirements

Expected Behavior

No error

Actual Behavior

Error in :messages:

Error executing vim.schedule lua callback: ...local/share/nvim/lazy/barbecue/lua/barbecue/ui/entry.lua:47: E539: Illegal character <[> stack traceback: [C]: in function 'nvim_eval_statusline' ...local/share/nvim/lazy/barbecue/lua/barbecue/ui/entry.lua:47: in function 'len' ...tyom/.local/share/nvim/lazy/barbecue/lua/barbecue/ui.lua:117: in function 'create_entries' ...tyom/.local/share/nvim/lazy/barbecue/lua/barbecue/ui.lua:216: in function <...tyom/.local/share/nvim/lazy/barbecue/lua/barbecue/ui.lua:200>

Error executing vim.schedule lua callback: ...local/share/nvim/lazy/barbecue/lua/barbecue/ui/entry.lua:47: E539: Illegal character stack traceback: [C]: in function 'nvim_eval_statusline' ...local/share/nvim/lazy/barbecue/lua/barbecue/ui/entry.lua:47: in function 'len' ...tyom/.local/share/nvim/lazy/barbecue/lua/barbecue/ui.lua:117: in function 'create_entries' ...tyom/.local/share/nvim/lazy/barbecue/lua/barbecue/ui.lua:216: in function <...tyom/.local/share/nvim/lazy/barbecue/lua/barbecue/ui.lua:200>

Neovim Version

NVIM v0.9.0
Build type: Release
LuaJIT 2.1.0-beta3

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/opt/homebrew/Cellar/neovim/0.9.0/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,
    },
    {
        "neovim/nvim-lspconfig",
        config = function()
            require("lspconfig").lua_ls.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

  1. Open Neovim runtime folder (in my case /opt/homebrew/Cellar/neovim/0.9.0/share/nvim/runtime)
  2. nvim -u repro.lua lua/vim/filetype.lua
  3. Wait until LSP is loaded (semantic highlighting will be applied)
  4. Go to line 1801, you should be inside ['.*%.[Cc][Ff][Gg]'] block
  5. Get an error E539: Illegal character <[>
  6. Go to line 1904, you should be inside ['.*%.git/.*'] block
  7. Get an error E539: Illegal character <g>

Haven't tried with nvim-navic only.