Mofiqul / vscode.nvim

Neovim/Vim color scheme inspired by Dark+ and Light+ theme in Visual Studio Code
MIT License
721 stars 114 forks source link

Update highlights for IndentBlankline.v3 #152

Open tony-sol opened 1 year ago

tony-sol commented 1 year ago

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 commented 8 months ago

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()
VytautasT commented 8 months ago

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 commented 8 months ago
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 commented 8 months ago

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 commented 8 months ago

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

MartenBE commented 8 months ago

@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 commented 3 months ago

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

MartenBE commented 3 weeks ago

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