vscode.nvim icon indicating copy to clipboard operation
vscode.nvim copied to clipboard

Update highlights for IndentBlankline.v3

Open tony-sol opened this issue 2 years ago • 8 comments

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 ❤️

tony-sol avatar Sep 28 '23 17:09 tony-sol

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 https://github.com/lukas-reineke/indent-blankline.nvim/issues/725 and have no clue how to fix that :/ The following snippet seems to work, but https://github.com/lukas-reineke/indent-blankline.nvim/issues/725#issuecomment-1781184454 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()

MartenBE avatar Mar 22 '24 13:03 MartenBE

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" } },
}

VytautasT avatar Mar 22 '24 14:03 VytautasT

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

MartenBE avatar Mar 22 '24 14:03 MartenBE

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.

VytautasT avatar Mar 22 '24 14:03 VytautasT

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

Mofiqul avatar Mar 24 '24 04:03 Mofiqul

@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 :) !

MartenBE avatar Mar 25 '24 09:03 MartenBE

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

ZTatman avatar Aug 08 '24 14:08 ZTatman