GithubHelp home page GithubHelp logo

lukas-reineke / indent-blankline.nvim Goto Github PK

View Code? Open in Web Editor NEW
3.8K 21.0 94.0 318 KB

Indent guides for Neovim

License: MIT License

Lua 99.35% Makefile 0.65%
vim vim-plugin neovim neovim-plugin indentation hacktoberfest

indent-blankline.nvim's Introduction

Indent 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 favourite plugin manager to install.

For lazy.nvim:

{ "lukas-reineke/indent-blankline.nvim", main = "ibl", 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()
Screenshot

Scope

Scope requires treesitter to be set up.

require("ibl").setup()
Screenshot

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()
Screenshot

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

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

rainbow-delimiters.nvim integration

rainbow-delimiters.nvim

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)
Screenshot

indent-blankline.nvim's People

Contributors

0xadk avatar applejag avatar chrboesch avatar clydog avatar cooperuser avatar crivotz avatar crumbtoo avatar danielkonge avatar daxtorim avatar etiamnullam avatar ggustafsson avatar goncalves-diogo avatar goolord avatar griwes avatar heavyjoost avatar jbarap avatar jpfender avatar jrwrigh avatar lukas-reineke avatar luukvbaal avatar mehalter avatar mesabytes avatar prince213 avatar ramojus avatar rhino1998 avatar tradiff avatar utilyre avatar wincent avatar ynhhoj avatar zeertzjq avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

indent-blankline.nvim's Issues

[Lua branch] Option to disable indent-blankline when in `diff` mode

Hello,

Just testing out the latest version as a full indentLine replacement. Looking great except for diff mode.

I use Neovim as my git diff viewer, and I have always found indentLine distracting whilst diffing so I disabled it with this snippet:

    if &diff
        :IndentLinesDisable
    endif

That worked.

But I can't achieve the same effect with indent-blankline.

Ideally I would like something like:

let g:indent_blankline_diff_exclude = v:true

Is something like possible?

Best regards.

Blank line not working

Hello,

I am unable to get the default setting for indent-blankline.nvim
I am running it on alacritty windows.
Got the lattest build to make it run NVIM v0.5.0-dev+1069 and the lua plugin. ( as seen in an other issue ).
I even tested his configuration but nothing happened.
I just want the default configuration as shown in the screenshot
Thanks in advance !

image

image

Indent is shown on one more level than it should be

Screen Shot 2020-04-19 at 3 05 54 pm

Expected behaviour is plugin only displays one indent guide for the file on line 10.

my config is:

let g:indentLine_char = 'β”‚'
let g:indentLine_color_term = 232

Using the latest available HEAD.

-- EDIT --
To clarify, whitespace characters are shown as - in the screenshot above. There are no spaces or tabs on line 5, 7, 13, 15.

The plugin changes the last position in jumplist

First of all, thank you for the fantastic plugin!

Then comes the issue. πŸ˜‚

I have this autocmd in my vimrc. However, after installing this plugin, everytime I open a file it jumps to a constant position while not the last position the cursor was placed.

augroup JumpToLastPosition
  autocmd!
  autocmd BufReadPost *
    \ if line("'\"") > 1 && line("'\"") <= line("$") && &filetype != 'gitcommit' |
      \ exe "normal! g`\"" |
    \ endif
augroup END

The plugin can change the jumplist, that should be unexpected.

Issue getting plugin to work

Hi. I downloaded this plugin after reading about it today, and am not able to get it working. I'm trying it with a minimal vimrc, with only indentLine installed (and of course this plugin!). The indent guide from indentLine show up fine, but the empty lines aren't filled in.
I also tried enabling debug, which resulted in this output:

Error detected while processing function indent_blankline#commands#ToggleAll[1]..indent_blankline#commands#Toggle[2]..indent_blankline#commands#Disab
le:
line    3:
E121: Undefined variable: g:indent_blankline_namespace
E116: Invalid arguments for function nvim_buf_clear_namespace

Any idea what I'm doing wrong?

Buggy extra_indent_level = -1: lines begin and end where the next level should

As you can see on this screenshot, although the last indent level is indeed hidden, the other indent lines' beginning and end are determined as if they were the next indent level.

I'm using the today's Neovim release (NVIM v0.5.0-dev+1126-g0496b572a), indent-blankline.nvim's lua branch, and the only settings are my line character and the extra indent level at -1.
1615112392

Feature idea-Link indent level chars to chars from text in buffer

Big fan of indent-blankline, thank you for what you've made!

Just wanted to throw this out there as an idea, not trying to make a pushy demand.

I like indent guides for coding. I'd like to be able to link the indent guide characters that indent-blanklike provides to specific types of indenting. In the photo that I've included, there are indent guides placed inside of the comment block, between two lines that do not share brackets (the array initialization and the example comment underneath it, and in the line underneath the example array initialization, where I've created a sloppy example of indentation that one might use when a list of parameters are too long for one line.

What Id like to be able to do is produce indent guides only between certain characters, such as curly braces for example.

Again, just throwing that out there! Thanks for reading!

example

New lua branch update giving weird results

I just updated to the lua branch after seeing your reddit post about the virtual text support (and built nvim as well, of course). However I'm seeing some odd behaviour straight away while viewing my init.vim.

image

In the above screenshot, column 1 always has an indentline drawn in it, which is not what I'd expect. In the indented portions, other indents are sometimes not drawn.

Relevant settings:

set expandtab
set smarttab
set tabstop=4
set shiftwidth=4

let g:indentLine_char = ''
let g:indentLine_bufTypeExclude = ['help', 'terminal']

Support non-blank lines

Just opening this to make sure that you're aware πŸ™‚

The overlay display mode for virtual text was just merged into HEAD: neovim/neovim#13952

This should allow for virtual text to be displayed anywhere, even on lines that are not blank.

The primary use cases of this display modes would be indent guides as well as EasyMotion style hints. Abusing the indent area for "sign" like display is also possible.

Support first indent level

First of all, thanks for this awesome plugin.

It would be nice if this plugin could show an indent guide for the first indent level (just like when g:indentLine_showFirstIndentLevel is truthy in https://github.com/Yggdroot/indentLine). I'm not used with EOL chars, so without them there's a blank space for the first indent level.

The indent guide for the first level can be disabled for files that are indented using spaces, but for ones with tabs, which use listchars, there's no way to remove the first indent level.

Weird behavior in multiline statements of c files

With the latest NVIM head(NVIM v0.5.0-dev+1108-g0450e155d) and latest plugin, I observe weird behavior with the plugin for C filetypes

vim config

call plug#begin('~/.vim/plugged')

Plug 'lukas-reineke/indent-blankline.nvim', { 'branch': 'lua'  }

call plug#end()

filetype plugin indent on
filetype plugin on

let g:indent_blankline_char = 'Β¦'
let g:indent_blankline_char_highlight = 'NonText'
let g:indent_blankline_extra_indent_level = -1
let g:indent_blankline_show_first_indent_level = 0
let g:indentLine_fileTypeExclude = ['help', 'chadtree', 'startify', 'fzf', 'tagbar']

Without plugin
nvim_blankline_expected

With Plugin
nvim_blankline_issue

Makes vim pretty slow on big files

Hey, so after #25 I've been able to use this plugin for a couple of weeks. The only real issue ("real" because I've encountered other issues like the indents indicators not showing up, but it's not that awkward) is that it slows nvim down a lot when writing on big files (I'm testing on a +60000 lines js file (don't ask me why this file exists in the first place, because I have no idea)).

Try to open a big file with this plugin enabled and you should see what I'm talking about. Feel free to ask me any more info πŸ™‚

Indent lines are not showing

After installing from the lua branch, I am unable to see any indent lines. I was previously using Yggdroot/indentLine, but removed it before installing indent-blankline.nvim. Running the commands have no effect (Disable/Enable/Refresh/Toggle). Currently on nvim v0.5.0-dev+1102-g595f6e4d6.

no_indent_lines

Visual Selection

Expected behavior:

  1. Visual selection should begin at start of line
  2. Background of indent guide character should be transparent

This screenshot shows how the visual selection should look:
Screen Shot 2021-02-22 at 12 17 12 PM

Actual behavior:

This is how it looks:
Screen Shot 2021-02-22 at 12 16 00 PM

Bracket scope highlighting on all levels

Hi,

I found out about bracket scope highlights from this reddit discussion https://www.reddit.com/r/neovim/comments/m9jxkt/bracket_pair_scope_highlight_like_vscode_does_it/.

It's something that I was also looking for, but I thought it's not possible. It's working fine, which is great!

I was wondering if you considered highlighting any scope, without providing the list of contexts?
If you tried it, is it too hard on performance?

I provided custom list of node types to highlight, but it seems it's not always highlighting the proper level. For example, I have this settings:

vim.g.indent_blankline_show_current_context = true
vim.g.indent_blankline_context_patterns = {'class', 'function', 'method', 'if', 'while', 'for'}

For example, this chunk of code doesn't highlight the if block but for:

if-on-whitespace

And this one doesn't highlight any level:

if-on-word

But the if outside the for loop works fine:

if-ok

some thoughts/unexpected behavior

I saw the reddit post and I've been playing around with it for a while now and I'm close to really liking it. I imagined I could replicate something that I had with indent rainbow in vscode:

Screenshot 2021-02-22

And I think the closest I can get is something like this?:

Screenshot 2021-02-22


Screenshot 2021-02-22

  • I don't think I can turn off the as on just the even/empty lines, because having them seems to be the selling point of this plugin. I don't mind them too much inside functions, but anywhere else, like line 15, it looks as if I have trailing whitespace there or a connection to something above even though it's a single function.
  • there always seems to be a 3 wide void before the let. I realized that setting a space in listchars fills it, but it also marks every other space.
  • the first color group is 5 wide instead of 4?

Something else I noticed is that indent_blankline_space_char_blankline_highlight_list doesn't seem to have any effect. indent_blankline_space_char_blankline_highlight does work though.

I'm not sure how much customization you want to offer with this plugin, judging by the number of options available it looks like a good amount.

Other than that, I think you have a really nice plugin here

Setting for change color

I don't want install Yggdroot/indentLine but use only this plugin, can you add option for change color the inden line.

Thanks

Issue with Python code

Great plugin! It works fine with cpp files, but I encoutered problems with python code. I have set
let g:indent_blankline_debug = v:true
and didn't see any error messages.

Here is my neovim version:

NVIM v0.5.0-563-ge628a05b5
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/gcc-5 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/home/travis/build/neovim/bot-ci/build/neovim/build/config -I/home/travis/build/neovim/bot-ci/build/neovim/src -I/home/travis/build/neovim/bot-ci/build/neovim/.deps/usr/include -I/usr/include -I/home/travis/build/neovim/bot-ci/build/neovim/build/src/nvim/auto -I/home/travis/build/neovim/bot-ci/build/neovim/build/include
Compiled by travis@travis-job-fcb253cc-3966-4429-bc1c-27234ed4df2e

And the minimal vimrc:

call plug#begin('~/.vim/plugged')
Plug 'Yggdroot/indentLine'
Plug 'lukas-reineke/indent-blankline.nvim'
call plug#end()

let g:indentLine_char = 'β”‚'
let g:indent_blankline_debug = v:true

indent_blankline

very goodeπŸ‘

How to set it to make the character list display more, the middle part feels weird,

Screen Shot 2020-12-18 at 2 29 26 PM

Screen Shot 2020-12-18 at 2 28 48 PM

Default highlight is changed to Comment

The documentation still mentions Conceal as default value for g:indent_blankline_char_highlight, however the value seems to be Comment.

Combined with italics for comments this gave a weird result ;)

Too many indent characters...

Hello, I think there are too many indent characters in places where they shouldn't be necessary...

Consider this screenshot for example:
image

I want it to behave like vscode where the indent chars only appear within scopes:

image

buftype_exclude ignored: still seeing indent guides

I'm on the lua branch, I have the following settings configured:

vim.g.indent_blankline_char = "β”Š"
vim.g.indent_blankline_filetype_exclude = { 'help' }
vim.g.indent_blankline_buftype_exclude = { 'terminal', 'nofile', 'packer'}
vim.g.indent_blankline_char_highlight = 'LineNr'

Yet I'm still getting indent guides in my packer window:

image

I also tried toggling indent guides with :IndentBlanklineDisable/:IndentBlanklineRefresh and :redraw but was not able to clear the lines.

This previously used to work, so I'm not sure if something has changed. I can bisect at some point but wanted to open the issue.

Undefined variable: dummy

Installed this (alongside with indentLine, which I was already using), but I get this error on startup (and no indentation guide on blank lines):

indent_blankline encountered an error: Vim(let):E121: Undefined variable: dummy

Does not respect g:indent_blankline_filetype

Hey πŸ‘‹,

I want to use this plugin for specific filetypes but whenever I set g:indent_blankline_filetype it never shows indent guides on blank lines. I've replicated this on the master and lua branch.

Only works for files in current directory

This plugin seems to only work on files in current directory. Looks like a problem with slashes or line ending characters on Windows.

Does not work for any of these paths:

.\Example.cs
Desktop\Example.cs
D:\Example.cs
..\Example.cs
~\Example.cs

Works fine only when file is opened directly like nvim Example.cs. Executing :cd .. after it is enough to make it stop working again.

OS: Windows 10
Neovim: v0.4.4

Minimal vimrc:

call plug#begin('~/.vim-plug')

    Plug 'lukas-reineke/indent-blankline.nvim'
    Plug 'Yggdroot/indentLine'
    Plug 'sheerun/vim-polyglot'

call plug#end()

Some more info that might be useful according to troubleshooting in other issues

  • Result of verbose setlocal indentexpr? (in typescript file):
indentexpr=GetTypescriptGraphQLIndent()
	Last set from ~\.vim-plug\vim-polyglot\after\indent\typescript.vim line 37
  • This prints "hello" as expected:
:echon rpcrequest(g:indent_blankline_nvim_instance, 'nvim_eval', '"hello"')
  • Nothing in :messages after running with this line in vimrc:
let g:indent_blankline_debug = v:true

...unless when its a VimL file:

indent-blankline encountered an error while finding matches: Vim:E492: Not an editor command: viminit.vim

...or when you open some help page (in this case simple :help):

indent-blankline encountered an error on refresh: Vim(call):E12: Command not allowed from exrc/vimrc in current dir or tag search
indent-blankline encountered an error while finding matches: Vim:E492: Not an editor command: eovimNeovimshare^@vim^Muntimedochelp.txt

Exclude filetype

indentline has this feature, I use to not add indents line in those cases:

let g:indentLine_fileTypeExclude = ['help', 'chadtree', 'startify', 'fzf', 'tagbar']

end of line list chars on empty lines

Currently, empty lines with indent guide don't display the end of line list char.
Maybe add an option to display a different character for the first column on empty lines.

Performance issues

Hi,

I tried the plugin but it made the CPU usage go quite high. I was wondering why you don't just update the indents for the current viewport instead of the whole file? I've been using a modified version of the script you posted in a few places, here it is: https://github.com/romgrk/nvim/blob/master/plugin/indent-lines.vim

It makes use of the new neovim/neovim#13117, but even without that you could always update the indent lines for +- the viewport's height (a scroll of more than that will move the cursor).

Doesn't work on a .tsx file

Hey πŸ‘‹, the plugin works fine on any js/ts file but doesn't on tsx files. I'm kind of a vim newbie so I don't really know what info to give, but feel free to ask me.

Many thanks for this plugin!

Unnecessary Lines

Really Loving the new vim.g.indent_blankline_char_highlight_list option btw.

I am getting a few unnecessary indent line when I have empty lines

Below I have attached a screenshot. (func bar is the expected behaviour even with empty lines)
(func foo has those extra lines)

And my indent line configuration has :

2021 03 22-18 59 18 screenshot

vim.g.indent_blankline_char = 'β”‚'
vim.g.indent_blankline_strict_tabs = true
-- Custom Highlight group
vim.g.indent_blankline_char_highlight_list = {'aqua_ind' , 'grey_ind', 'yellow_ind','algea_ind'}
vim.g.indent_blankline_use_treesitter = true

[Lua branch] Indent guides covering text

Hi, I'm having the same problem as issue #44, but I don't use Vim-Plug. Any ideas how to fix it?

There is some information if it is useful:

  • Platform: Linux (Fedora 34)
  • Neovim: NVIM v0.5.0-dev+1165-ge5bef5974

Thanks in advance πŸ™‚

Current context is only updated via scrolling the window not by moving the cursor

indent_blankline

When using the newly added (and excellent) current context feature. I've noticed that the scope is only highlighted when the section of the buffer is scrolled to but not when the cursor moves into a different scope. I'm not sure if this is because it'd be expensive to calculate on CursorHold or something, maybe it could be debounced or ignored if the scope doesn't change etc.

In the GIF above the bigger movements are scroll events and the smaller ones are me spamming j,k.

g:indent_blankline_use_treesitter throws error

So I've set the following value:

let g:indent_blankline_use_treesitter = v:true

but I'm getting these error messages if I open a file:
image

Here all my configs currenty:

let g:indent_blankline_filetype_exclude = ['help']
let g:indent_blankline_buftype_exclude = ['terminal']
let g:indent_blankline_space_char = ' '
let g:indent_blankline_use_treesitter = v:true
let g:indent_blankline_show_first_indent_level = v:false
let g:indent_blankline_show_end_of_line = v:true
let g:indent_blankline_show_current_context = v:true
let g:indent_blankline_context_highlight = 'Function'
let g:indent_blankline_context_highlight = [
                                            \ 'class',
                                            \ 'function',
                                            \ 'method',
                                            \ ]

Thank you for this plugin!

E216: No such group or event: WinScrolled * IndentBlanklineRefresh

Error detected while processing /home/fausto/.dotfiles/neovim/.config/nvim/plugged/indent-blankline.nvim/plugin/indent_blankline.vim:
line   46:
E216: No such group or event: WinScrolled * IndentBlanklineRefresh

Neovim version:

NVIM v0.5.0-654-g3acfefb63
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/cc -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/build/nvim/parts/nvim/build/build/config -I/build/nvim/parts/nvim/build/src -I/build/nvim/parts/nvim/build/.deps/usr/include -I/usr/include -I/build/nvim/parts/nvim/build/build/src/nvim/auto -I/build/nvim/parts/nvim/build/build/include
Compiled by root@lgw01-amd64-012

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"

Run :checkhealth for more info

Installation method:

Plug 'lukas-reineke/indent-blankline.nvim', { 'branch': 'lua' }

(vim-plug)

indent guides cover text

Platform: MacOS
Nvim: NVIM v0.5.0-dev+nightly-45-g9d5f84280 or NVIM v0.5.0-dev+nightly-46-g0450e155d
init.vim:

call plug#begin('~/.local/share/nvim/plugged')
" Plug 'Yggdroot/indentLine'
Plug 'lukas-reineke/indent-blankline.nvim', {'branch': 'lua' }
call plug#end()

Screenshot 2021-02-23 at 10 26 52

Originally posted by @lkhphuc in #39 (comment)

Integration with IndentLine?

First off, thank you so much for finally fixing the incredibly annoying indent line issue on blank lines! Do you think there is any hope of combining these two plugins into one? It just seems slightly silly to have two separate plugins that essentially do one thing.

Does not work with lazy-loaded with vim-plug

I have

Plug 'Yggdroot/indentLine', {
            \ 'for': ['html', 'css'] }                  " Indent guides
Plug 'lukas-reineke/indent-blankline.nvim', {
            \ 'for': ['html', 'css'] }                  " Indent guides on empty lines

in my init.vim.
When I start editing an HTML file, indentLine is loaded correctly and works as expected while indent-blankline is loaded (in fact all the commands are available) but I can't see the indent guides in the blank lines.
Running :IndentBlanklineDisableAll and :IndentBlanklineEnableAll or :IndentBlanklineRefresh does not solve the problem.
If I disable the lazy-loading, indent-blankline works fine.

Great plugin btw : )

Plugin does not work.

My nvim:

NVIM v0.5.0-dev
Build type: RelWithDebInfo
Lua 5.1
Compilation: /usr/bin/cc -g -O2 -fdebug-prefix-map=/build/neovim-oa960Y/neovim-0.5.0+ubuntu1+git202008171349-161cdba1e-00e710ec6=. -fstack-protector-strong -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/build/neovim-oa960Y/neovim-0.5.0+ubuntu1+git202008171349-161cdba1e-00e710ec6/build/config -I/build/neovim-oa960Y/neovim-0.5.0+ubuntu1+git202008171349-161cdba1e-00e710ec6/src -I/build/neovim-oa960Y/neovim-0.5.0+ubuntu1+git202008171349-161cdba1e-00e710ec6/.deps/usr/include -I/usr/include -I/build/neovim-oa960Y/neovim-0.5.0+ubuntu1+git202008171349-161cdba1e-00e710ec6/build/src/nvim/auto -I/build/neovim-oa960Y/neovim-0.5.0+ubuntu1+git202008171349-161cdba1e-00e710ec6/build/include
Compiled by buildd@lcy01-amd64-026

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"

Run :checkhealth for more info

Here is part of my vimrc containing plug install: https://gist.github.com/dominikduda/7369b764aa54002f1d749c97b69a0832#file-vimrc-L124
Here is the plugin config: https://gist.github.com/dominikduda/7369b764aa54002f1d749c97b69a0832#file-vimrc-L1187

Thats how it looks like:
image

Am I doing something wrong? It does not work out of the box for me, neither I see anything wrong with the config.

Background color mismatch in indent blanklines

Hi there,
first of all: Thx a lot for your effort! I recently switched to neovim and I stumbled over this plugin. One big problem seems to be solved on my bucket list ;)

I got a little problem with your indents in blank lines. As you can see there occurs a bg color mismatch. Do you have an idea how to fix this? Maybe I have to modify my color scheme?

My setup:
neovim 0.4.3 on ArchLinux
I also use the Yggdroot/indentLine plugin.

2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.