lukas-reineke / indent-blankline.nvim

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

No Indentation Guides In Empty Code Blocks #619

Closed Isrothy closed 1 year ago

Isrothy commented 1 year ago

Thank you for your plugin However, on version v3, I find that indent guides are missing in empty blocks in c++

#include <iostream>

int main() {
    if (1 == 2) {

    }
    return 0;
}
image

My configuration is

"lukas-reineke/indent-blankline.nvim",
branch = "v3",
event = { "BufReadPre", "BufNewFile" },
config = function()
    local hooks = require("ibl.hooks")
    hooks.register(hooks.type.SCOPE_HIGHLIGHT, hooks.builtin.scope_highlight_from_extmark)
    require("ibl").setup({
        indent = {
            char = "▎",
            tab_char = "▎",
            char_blankline = "▎",
            context_char = "▎",
            priority = 12,
            smart_indent_cap = true,
        },
        whitespace = {
            -- highlight = { "Whitespace", "NonText" },
            remove_blankline_trail = false,
        },
        scope = {
            enabled = true,
            show_start = true,
            show_end = true,
            highlight = {
                "RainbowDelimiterRed",
                "RainbowDelimiterYellow",
                "RainbowDelimiterBlue",
                "RainbowDelimiterOrange",
                "RainbowDelimiterGreen",
                "RainbowDelimiterViolet",
                "RainbowDelimiterCyan",
            },
        },
    })
end,
lukas-reineke commented 1 year ago

I pushed a fix, please check

Isrothy commented 1 year ago

Fixed! Thank you!