- Notifications
You must be signed in to change notification settings - Fork109
lukas-reineke/indent-blankline.nvim
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This plugin adds indentation guides to Neovim.It uses Neovim's virtual text feature andno conceal
To start using indent-blankline, call theibl.setup()
function.
This plugin requires the latest stable version of Neovim.
Use your favorite plugin manager to install.
Forlazy.nvim:
{"lukas-reineke/indent-blankline.nvim",main="ibl",---@module"ibl"---@typeibl.configopts= {},}
Forpckr.nvim:
use"lukas-reineke/indent-blankline.nvim"
To initialize and configure indent-blankline, run thesetup
function.
require("ibl").setup()
Optionally, you can pass a configuration table to the setup function. For allavailable options, take a look at:help ibl.config
.
require("ibl").setup()

Scope requires treesitter to be set up.
require("ibl").setup()

The scope isnot the current indentation level! Instead, it is theindentation level where variables or functions are accessible, as inWikipedia Scope (Computer Science). This dependson the language you are writing. For more information, see:help ibl.config.scope
.
The start and end of scope uses underline, so to achieve the best result youmight need to tweak the underline position. In Kitty terminal for example youcan do that withmodify_font
require("ibl").setup()

localhighlight= {"RainbowRed","RainbowYellow","RainbowBlue","RainbowOrange","RainbowGreen","RainbowViolet","RainbowCyan",}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,"RainbowRed", {fg="#E06C75"})vim.api.nvim_set_hl(0,"RainbowYellow", {fg="#E5C07B"})vim.api.nvim_set_hl(0,"RainbowBlue", {fg="#61AFEF"})vim.api.nvim_set_hl(0,"RainbowOrange", {fg="#D19A66"})vim.api.nvim_set_hl(0,"RainbowGreen", {fg="#98C379"})vim.api.nvim_set_hl(0,"RainbowViolet", {fg="#C678DD"})vim.api.nvim_set_hl(0,"RainbowCyan", {fg="#56B6C2"})end)require("ibl").setup {indent= {highlight=highlight } }

localhighlight= {"CursorColumn","Whitespace",}require("ibl").setup {indent= {highlight=highlight,char=""},whitespace= {highlight=highlight,remove_blankline_trail=false, },scope= {enabled=false },}

localhighlight= {"RainbowRed","RainbowYellow","RainbowBlue","RainbowOrange","RainbowGreen","RainbowViolet","RainbowCyan",}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,"RainbowRed", {fg="#E06C75"})vim.api.nvim_set_hl(0,"RainbowYellow", {fg="#E5C07B"})vim.api.nvim_set_hl(0,"RainbowBlue", {fg="#61AFEF"})vim.api.nvim_set_hl(0,"RainbowOrange", {fg="#D19A66"})vim.api.nvim_set_hl(0,"RainbowGreen", {fg="#98C379"})vim.api.nvim_set_hl(0,"RainbowViolet", {fg="#C678DD"})vim.api.nvim_set_hl(0,"RainbowCyan", {fg="#56B6C2"})end)vim.g.rainbow_delimiters= {highlight=highlight }require("ibl").setup {scope= {highlight=highlight } }hooks.register(hooks.type.SCOPE_HIGHLIGHT,hooks.builtin.scope_highlight_from_extmark)

About
Indent guides for Neovim