You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi!
I'm sorry if this is intended behavior, but I figured I should ask.
If I have my cursor under a function scope, I don't get highlights for the scope, however if I have the cursor under a block under the function scope (if block, for block, function block), I do get highlights.
Interestingly the show_start and show_end underlining does not have this problem.
(Notice the 3rd indent highlight)
Steps to reproduce
-- min-init.lualocallazypath="/tmp/lazy/lazy.nvim"ifnotvim.loop.fs_stat(lazypath) thenvim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable",
lazypath,
})
endvim.opt.rtp:prepend(lazypath)
vim.opt.termguicolors=truerequire("lazy").setup({
{
"lukas-reineke/indent-blankline.nvim",
config=function()
localhighlight= {
"IndentLight1",
"IndentLight2",
"IndentLight3",
"IndentBase1",
"IndentBase2",
"IndentBase3",
"IndentDark1",
"IndentDark2",
"IndentDark3",
"IndentDarker1",
"IndentDarker2",
"IndentDarker3",
}
localhooks=require("ibl.hooks")
-- create the highlight groups in the highlight setup hook, so they are reset-- every time the colorscheme changeshooks.register(hooks.type.HIGHLIGHT_SETUP, function()
vim.api.nvim_set_hl(0, "IndentLight1", { fg="#AFC8FF" })
vim.api.nvim_set_hl(0, "IndentLight2", { fg="#C2B0FF" })
vim.api.nvim_set_hl(0, "IndentLight3", { fg="#A6FFFC" })
vim.api.nvim_set_hl(0, "IndentBase1", { fg="#82AAFF" })
vim.api.nvim_set_hl(0, "IndentBase2", { fg="#A084FF" })
vim.api.nvim_set_hl(0, "IndentBase3", { fg="#74FFFA" })
vim.api.nvim_set_hl(0, "IndentDark1", { fg="#527FDF" })
vim.api.nvim_set_hl(0, "IndentDark2", { fg="#7555E1" })
vim.api.nvim_set_hl(0, "IndentDark3", { fg="#40D9D4" })
vim.api.nvim_set_hl(0, "IndentDarker1", { fg="#2F5FC3" })
vim.api.nvim_set_hl(0, "IndentDarker2", { fg="#5433C7" })
vim.api.nvim_set_hl(0, "IndentDarker3", { fg="#1DB9B3" })
end)
require("ibl").setup({
indent= {
char="│",
tab_char="│",
highlight=highlight,
},
scope= {
show_start=true,
show_end=true,
highlight=highlight,
},
})
end,
},
{
"nvim-treesitter/nvim-treesitter",
build=":TSUpdate",
config=function()
require("nvim-treesitter.configs").setup({
ensure_installed= { "lua" }, -- change this to the language you use
})
end,
},
}, { root="/tmp/lazy" })
Expected behavior
I expect the indent line highlight to be active while the cursor is anywhere under the scope.
Neovim version (nvim -v)
NVIM v0.10.0
The text was updated successfully, but these errors were encountered:
I'm not sure I understand your problem.
In the first screenshot, you are in the opts function scope, and that is highlighted correctly.
In the second screenshot, you are in the hooks.register function scope, and that is highlighted correctly too.
Alright, yes, the highlights are correct.
I was confused, since I didn't know it would highlight the current scope with the first highlight color in the config.
I played around with it a bit and it's clear now, thanks!
Slight off-topic question, is there a way to tell ibl to highlight the current scope with a different color than the first one set in config.indent.highlight?
Ah I understand your problem now. Setting a list of highlights for scope is currently broken #860.
You can still set a different color from the normal highlights though.
Problem
Hi!
I'm sorry if this is intended behavior, but I figured I should ask.
If I have my cursor under a function scope, I don't get highlights for the scope, however if I have the cursor under a block under the function scope (if block, for block, function block), I do get highlights.
Interestingly the show_start and show_end underlining does not have this problem.
(Notice the 3rd indent highlight)
Steps to reproduce
Expected behavior
I expect the indent line highlight to be active while the cursor is anywhere under the scope.
Neovim version (nvim -v)
NVIM v0.10.0
The text was updated successfully, but these errors were encountered: