Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update highlights for IndentBlankline.v3 #152

Open
tony-sol opened this issue Sep 28, 2023 · 8 comments
Open

Update highlights for IndentBlankline.v3 #152

tony-sol opened this issue Sep 28, 2023 · 8 comments

Comments

@tony-sol
Copy link

IndentBlankline is now version 3, current highlights may not working properly
https://github.com/Mofiqul/vscode.nvim/blob/main/lua/vscode/theme.lua#L492

Please, consider to update themes to deps latest versions ❤️

@MartenBE
Copy link

MartenBE commented Mar 22, 2024

This is what I think needs to happen in theme.lua:

    -- IndentBlankLine
    hl(0, 'IblIndent', { fg = c.vscContext })
    hl(0, 'IblScope', { fg = c.vscContextCurrent })
    hl(0, 'IblWhitespace', { fg = c.vscContext })

Unfortunately, I also seem to hit lukas-reineke/indent-blankline.nvim#725 and have no clue how to fix that :/ The following snippet seems to work, but lukas-reineke/indent-blankline.nvim#725 (comment) actually seems the cleaner solution

require('vscode').setup({
    italic_comments = true,
    underline_links = true,
})
require('vscode').load()

-- https://github.com/lukas-reineke/indent-blankline.nvim/issues/725
require("ibl").setup()

@VytautasT
Copy link
Contributor

VytautasT commented Mar 22, 2024

This works for me as a temporary solution:

local vscode = require 'vscode'
vscode.setup {}
vscode.load()

require("ibl").setup {
  scope = {
    show_start = false,
    show_end = false,
    highlight = { "IndentBlanklineContextChar" }
  },
  indent = { highlight = { "IndentBlanklineSpaceChar" } },
}

@MartenBE
Copy link

require("ibl").setup {
  scope = {
    show_start = false,
    show_end = false,
    highlight = { "IndentBlanklineContextChar" }
  },
  indent = { highlight = { "IndentBlanklineSpaceChar" } },
}

That gives me the following error, you probably got lucky because of the order you load the plugins.

Failed to run `config` for indent-blankline.nvim

...e/nvim/lazy/indent-blankline.nvim/lua/ibl/highlights.lua:71: No highlight group 'IndentBlanklineContextChar' found

# stacktrace:
  - /indent-blankline.nvim/lua/ibl/highlights.lua:71 _in_ **setup**
  - /indent-blankline.nvim/lua/ibl/init.lua:42 _in_ **setup**
  - /indent-blankline.nvim/lua/ibl/init.lua:58 _in_ **setup**
  - ~/.config/nvim/init.lua:109

@VytautasT
Copy link
Contributor

That gives me the following error, you probably got lucky because of the order you load the plugins.

Sorry, forgot to include vscode in my example. Edited the comment.

@Mofiqul
Copy link
Owner

Mofiqul commented Mar 24, 2024

Sorry for late. Did they add new highlight group? What are the breaking changes?

@MartenBE
Copy link

@Mofiqul the highlights seems to have changed, and there is also some issue with highlightgroups. The links in this thread point to the issues at hand. Thanks for looking into it :) !

@ZTatman
Copy link

ZTatman commented Aug 8, 2024

Is there any update on this issue? Curious to know if this is still a problem others are facing.

@MartenBE
Copy link

MartenBE commented Nov 4, 2024

The problem is still here ...

I fixed it using Lazy dependencies:

{
    "lukas-reineke/indent-blankline.nvim",
    dependencies = "Mofiqul/vscode.nvim",
    main = "ibl",
    config = function()
        require("ibl").setup({
            indent = {
                char = "",
                highlight = { "IndentBlanklineChar" }
            },
            scope = {
                highlight = { "IndentBlanklineContextChar" }
            },
        })
    end,
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants