lukas-reineke / indent-blankline.nvim

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

v3: scope not highlighted with go #623

Closed desdic closed 1 year ago

desdic commented 1 year ago

Don't know why because the scope works with C, Lua, Python but with Go no scope is shown and no indent shown

Config:

    {
        "lukas-reineke/indent-blankline.nvim",
        event = { "VeryLazy" },
        branch = "v3",
        config = function()
            local highlight = {
                'RainbowDelimiterRed',
                'RainbowDelimiterYellow',
                'RainbowDelimiterOrange',
                'RainbowDelimiterGreen',
                'RainbowDelimiterBlue',
                'RainbowDelimiterCyan',
                'RainbowDelimiterViolet',
            }
            require('ibl').setup({
                indent = { char = "│" },
                exclude = { "help", "alpha", "dashboard", "neo-tree", "Trouble", "lazy", "mason" },
                scope = {
                    enabled = true,
                    highlight = highlight,
                    show_start = false,
                    show_end = false,
                }
            })
            local hooks = require "ibl.hooks"
            hooks.register(hooks.type.SCOPE_HIGHLIGHT, hooks.builtin.scope_highlight_from_extmark)
        end,
    },

NVIM v0.9.1 Build type: Release LuaJIT 2.1.1692616192

with Go's treesitter + language servers installed and updated.

lukas-reineke commented 1 year ago

You probably don't have list set?

The logic currently is, for tabs use config.indent.tab_char if set, if not use listchars. But if you have neither, it displays nothing.

I guess it should probably fall back to the normal config.indent.char instead :thinking:

lukas-reineke commented 1 year ago

I guess it should probably fall back to the normal config.indent.char instead

I pushed a new commit to do this

desdic commented 1 year ago

commit works perfectly, thanks :)