lukas-reineke / indent-blankline.nvim

Indent guides for Neovim
MIT License
4.17k stars 102 forks source link

Tab characters not shown correctly when `list` is on and `listchars` has `tab` #675

Closed loqusion closed 1 year ago

loqusion commented 1 year ago

Problem

Default listchars is tab:> ,trail:-,nbsp:+. When list is turned on, tabs are displayed as > when they should be treated similarly to space in expected behavior below.

image

Steps to reproduce

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

-------------------
vim.opt.list = true
-------------------

require("lazy").setup({
  {
    "lukas-reineke/indent-blankline.nvim",
    config = function()
      require("ibl").setup({})
    end,
  },
  -- uncomment this if the problem is related to scope
  -- {
  --     "nvim-treesitter/nvim-treesitter",
  --     build = ":TSUpdate",
  --     config = function()
  --         require("nvim-treesitter.configs").setup {
  --             ensure_installed = { "rust" }, -- change this to the language you use
  --         }
  --     end,
  -- },
}, { root = "/tmp/lazy" })

Expected behavior

image

Neovim version (nvim -v)

NVIM v0.10.0-dev-1261+g09a17f91d0

lukas-reineke commented 1 year ago

duplicate of #665