lukas-reineke / indent-blankline.nvim

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

What happened to `show_current_context` in version 3.1? #648

Closed pedro757 closed 1 year ago

pedro757 commented 1 year ago

Problem

What happened to show_current_context in version 3.1?

Steps to reproduce

What happened to show_current_context in version 3.1?

Expected behavior

What happened to show_current_context in version 3.1?

Neovim version (nvim -v)

0.10

lukas-reineke commented 1 year ago

please read the migration guide

HendrikPetertje commented 1 year ago

Wondering about this too, the migration guide doesn't really go in detail about the state of the currently highlighted context (in the past the current indentation level you were on would highlight and you could even apply show_current_context_start (which i disabled, but would highlight the start of the indentation context.

highligting contexts was a really really nice feature of this plugin especially in larger Python control flows.

lukas-reineke commented 1 year ago

Read :help ibl.config.scope.enabled, this is covered in the migration guide.

HendrikPetertje commented 1 year ago

Just went through it, I was able to fix most of my whoes with this:

iblsetup {
  whitespace = {
    remove_blankline_trail = true
  },
  exclude = {
    filetypes = {
      "lspinfo",
      "packer",
      "checkhealth",
      "help",
      "man",
      "",
    }
  },
  scope = {
    enabled = true,
    highlight = { "SpecialKey", "SpecialKey", "SpecialKey" },
    show_start = false
  }
}

turns out the hightlight that was being set had no effect in my theme, so when switching to SpecialKey it suddenly worked :)

Thanks for maintaining this plugin and making it a tad more customizable with all these hooks!

lukas-reineke commented 1 year ago

It doesn't hurt, but most of that config is just setting the default values again, you can reduce this to just

{
  scope = {
    highlight = { "SpecialKey", "SpecialKey", "SpecialKey" },
    show_start = false
  }
}

And it will do the same