utilyre / barbecue.nvim

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

[BUG]: Handle File Path '\\' under Windows #63

Closed linrongbin16 closed 1 year ago

linrongbin16 commented 1 year ago

Requirements

Expected Behavior

In windows cmd/powershell, file path is not separated by '/', but it's a '\'. Expect this plugin split path correctly under windows.

Actual Behavior

The file path splits not actually working: image

Neovim Version

latest stable: 0.8.2

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

use lazy.nvim to install barbecue and neo-tree.nvim, open this plugin project and will see it.

linrongbin16 commented 1 year ago

I'm trying to submit a PR to fix it.

linrongbin16 commented 1 year ago

This issue is fixed in #64