lukas-reineke/indent-blankline.nvim
소개
Neovim용 들여쓰기 가이드
개발 도구측정된 스타 증가
- in 24h
- +2
- in 7 days
- +2
- in 15 days
- +4
- in 1 month
- +13
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalIndent Blankline
This plugin adds indentation guides to Neovim. It uses Neovim's virtual text feature and no conceal
To start using indent-blankline, call the ibl.setup() function.
This plugin requires the latest stable version of Neovim.
Install
Use your favorite plugin manager to install.
For vim.pack (Neovim 0.12+):
vim.pack.add({
"https://github.com/lukas-reineke/indent-blankline.nvim"
})
For lazy.nvim:
{
"lukas-reineke/indent-blankline.nvim",
main = "ibl",
---@module "ibl"
---@type ibl.config
opts = {},
}
For pckr.nvim:
use "lukas-reineke/indent-blankline.nvim"
Setup
To initialize and configure indent-blankline, run the setup function.
require("ibl").setup()
Optionally, you can pass a configuration table to the setup function. For all
available options, take a look at :help ibl.config.
Screenshots
Simple
require("ibl").setup()
Scope
Scope requires treesitter to be set up.
require("ibl").setup()
The scope is not the current indentation level! Instead, it is the
indentation level where variables or functions are accessible, as in Wikipedia Scope (Computer Science). This depends
on 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 you might need to tweak the underline position. In Kitty terminal for example you can do that with modify_font
Mixed indentation
require("ibl").setup()
Multiple indent colors
local highlight = {
"RainbowRed",
"RainbowYellow",
"RainbowBlue",
"RainbowOrange",
"RainbowGreen",
"RainbowViolet",
"RainbowCyan",
}
local hooks = require "ibl.hooks"
-- create the highlight groups in the highlight setup hook, so they are reset
-- every time the colorscheme changes
hooks.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 } }
Background color indentation guides
local highlight = {
"CursorColumn",
"Whitespace",
}
require("ibl").setup {
indent = { highlight = highlight, char = "" },
whitespace = {
highlight = highlight,
remove_blankline_trail = false,
},
scope = { enabled = false },
}
rainbow-delimiters.nvim integration
local highlight = {
"RainbowRed",
"RainbowYellow",
"RainbowBlue",
"RainbowOrange",
"RainbowGreen",
"RainbowViolet",
"RainbowCyan",
}
local hooks = require "ibl.hooks"
-- create the highlight groups in the highlight setup hook, so they are reset
-- every time the colorscheme changes
hooks.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)
관련 프로젝트 살펴보기
불러오는 중…