lukas-reineke / indent-blankline.nvim

Indent guides for Neovim
MIT License
4.09k stars 101 forks source link

Indent virtual text doesn't line up correctly in all neovim GUI #422

Closed green726 closed 2 years ago

green726 commented 2 years ago

The indented line virtual text does not line up properly in neovim GUIs.

What happens (screenshot is in neovim-qt): neovim-qt not working properly

What it should be (terminal neovim): neovim working correctly

I also tested this in goneovim, nvui, neovide, and nvim-gtk and had the same issue in all of them.

This is on linux (endeavouros with gnome on wayland) but also occured on windows. My font is SpaceMono Nerd Font. Below is my indent-blanline config

local indent_blankline_styles = {
    "│",
    "▏",
    "¦",
    "┆",
    "│",
    "⎸",
    "|",
}

vim.g.indent_blankline_char = indent_blankline_styles[1]

-- Disable indent-blankline on these pages.
vim.g.indent_blankline_filetype_exclude = {
    "help",
    "terminal",
    "dashboard",
    "paq",
    "lsp-installer",
    "lspinfo",
    "vista_kind",
    "alpha",
}
vim.g.indent_blankline_buftype_exclude = { "terminal" }

vim.g.indent_blankline_use_treesitter = true
vim.g.indent_blankline_show_trailing_blankline_indent = true
vim.g.indent_blankline_show_first_indent_level = true
-- vim.g.indent_blankline_context_char = indent_blankline_styles[1]
vim.cmd("autocmd CursorMoved * IndentBlanklineRefresh")

require("indent_blankline").setup({
    --show_current_context = true,
    --show_current_context_start = true,
})

EDIT: I reinstalled the jetbrainsmono nerd font from the AUR and now this issue is gone, but only with that font. I am guessing that this is an issue with the fonts and not this plugin?

lukas-reineke commented 2 years ago

Yes, this depends on the font you use. Some terminals patch your font automatically to make this look better. That might be why the font works there.