indent-blankline.nvim icon indicating copy to clipboard operation
indent-blankline.nvim copied to clipboard

Error when opening DiffView

Open edshamis opened this issue 1 year ago • 1 comments

Problem

When I run :DiffviewOpen (sindrets/diffview.nvim) I get this:

   Error  14:33:20 notify.error lazy.nvim Failed to run `config` for indent-blankline.nvim

...share/nvim/lazy/indent-blankline.nvim/lua/ibl/config.lua:140: char: expected indent.char to have a display width of 0 or 1, got │. Info: '│' has a display width of 12

# stacktrace:
  - vim/shared.lua:0 _in_ **validate**
  - /indent-blankline.nvim/lua/ibl/config.lua:140 _in_ **validate_config**
  - /indent-blankline.nvim/lua/ibl/config.lua:275 _in_ **set_config**
  - /indent-blankline.nvim/lua/ibl/init.lua:58 _in_ **setup**
  - vim/_editor.lua:0 _in_ **cmd**
  - /diffview.nvim/lua/diffview/vcs/file.lua:162
  - /diffview.nvim/lua/diffview/async.lua:193 _in_ **step**
  - /diffview.nvim/lua/diffview/async.lua:247 _in_ **notify_all**
  - /diffview.nvim/lua/diffview/async.lua:222 _in_ **step**
  - /diffview.nvim/lua/diffview/async.lua:399

Steps to reproduce

nvim :DiffviewOpen

Expected behavior

No error

Neovim version (nvim -v)

NVIM v0.10.0-dev-2150+ge68decab0

edshamis avatar Jan 23 '24 12:01 edshamis

I cannot reproduce this, please make use the minimal reproduction template.

lukas-reineke avatar Jan 23 '24 14:01 lukas-reineke

Closing this for inactivity. Feel free to open again with reproduction steps.

lukas-reineke avatar Apr 09 '24 01:04 lukas-reineke

I can reproduce this with the config below

vim.opt.showbreak = "↪ "
vim.opt.number = true

local lazypath = "/tmp/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
    vim.fn.system { "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath }
end
vim.opt.rtp:prepend(lazypath)
vim.opt.termguicolors = true

require("lazy").setup ({
    {
        "lukas-reineke/indent-blankline.nvim",
        event = { "BufReadPost", "BufNewFile" },
        main = "ibl",
        opts = {
            indent = {
                char = "│",
            },
        }
    },
    {
        "sindrets/diffview.nvim",
        opts = {}
    },
}, { root = "/tmp/lazy" })

gpncarl avatar Jun 28 '24 03:06 gpncarl

Thanks :+1: I released a fix.

lukas-reineke avatar Jun 28 '24 03:06 lukas-reineke