lukas-reineke / indent-blankline.nvim

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

Indent guides don't show up #338

Closed LoadingBG closed 2 years ago

LoadingBG commented 2 years ago

Indentation guides don't show up at all: image It seems like the commands don't do anything - :IndentBlanklineDisable + :IndentBlanklineEnable doesn't work, nor does :IndentBlanklineRefresh


Here's my config (using packer.nvim):

use {
   "lukas-reineke/indent-blankline.nvim",
   --requires = "nvim-treesitter",
   --after = { "theme", "nvim-treesitter" },
   --after = "theme",
   --after = "nvim-treesitter",
   config = function()
      require("indent_blankline").setup {
         use_treesitter = true,
         show_current_context = true,
         context_patterns = {
            "class", "function", "method", "block", "list_literal", "selector",
            "^if", "^table", "if_statement", "while", "for",
         },
         filetype_exclude = { "help", "terminal", "packer", "NvimTree" },
         buftype_exclude = { "terminal" },
      }
   end
}

The comments are what I've tried to do to get the plugin working (theme is https://github.com/monsonjeremy/onedark.nvim)


Neovim version:

NVIM-QT v0.2.17.9999
Build type: Release
Compilation: -Wall -Wextra -Wno-unused-parameter -Wunused-variable -std=c++11
Qt Version: 5.15.2

NVIM v0.6.0-dev+600-gf71be1f87
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3

Features: -acl +iconv +tui

OS: Windows 10 Pro Version 20H2 Build 19042.1415

lukas-reineke commented 2 years ago

Your config looks fine. Are you getting any errors?

Also, can you check the output of :highlight IndentBlanklineChar

LoadingBG commented 2 years ago

image Looks right to me, also there are no errors. Here are all IndentBlankline highlights: image

LoadingBG commented 2 years ago

I updated neovim to the stable version so now it's

NVIM-QT v0.2.16.1
Build type: Release
Compilation: -Wall -Wextra -Wno-unused-parameter -std=c++11 -Wfatal-errors
Qt Version: 5.11.3

NVIM v0.6.0
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3

Features: -acl +iconv +tue

Still no indentation guides

lukas-reineke commented 2 years ago

Can you check the output of :lua print(vim.inspect(vim.api.nvim_buf_get_extmarks(0, vim.g.indent_blankline_namespace, 0, -1, {})))

LoadingBG commented 2 years ago

It's {}

lukas-reineke commented 2 years ago

What is the output of :lua print(vim.b.__indent_blankline_active)?

LoadingBG commented 2 years ago

true

lukas-reineke commented 2 years ago

Everything looks correct. Sorry I don't have any other ideas. Something in your setup is causing a problem. If you can make a minimal init.lua that reproduces this, I can debug further.

LoadingBG commented 2 years ago

Seems to be working with just this plugin enabled, I'll try to pinpoint the issue. Thanks.

bugsbugsbux commented 2 years ago

i think it doesnt work when you're on a comment-line... move your cursor out of the comment

lukas-reineke commented 2 years ago

it doesnt work when you're on a comment-line

That is not true. What your cursor is on doesn't matter.

bugsbugsbux commented 2 years ago

at least for me, whenever my cursor is in a comment the current context chars dont show up...

lukas-reineke commented 2 years ago

Then your context pattern probably match the comment. You can open a new issue with your config if you want. But that is not related to this issue.