Skip to content

Custom indent character for blank lines #664

Closed Answered by lukas-reineke
Roundlay asked this question in Q&A
Discussion options

You must be logged in to vote

This feature was removed to simplify the logic, but you can use hooks to implement it yourself
This is a basic example

local hooks = require "ibl.hooks"
hooks.register(hooks.type.VIRTUAL_TEXT, function(_, bufnr, row, virt_text)
    local line = vim.api.nvim_buf_get_lines(bufnr, row, row + 1, false)[1]
    if line == "" then
        for _, v in ipairs(virt_text) do
            if v[1] == "" then
                v[1] = ""
            end
        end
    end
    return virt_text
end)

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Roundlay
Comment options

@lukas-reineke
Comment options

@Roundlay
Comment options

Answer selected by lukas-reineke
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants