lukas-reineke / indent-blankline.nvim

Indent guides for Neovim
MIT License
4.2k stars 104 forks source link

Space char not working on latest neovim #205

Closed luisiacc closed 3 years ago

luisiacc commented 3 years ago

This is my config:

let g:indent_blankline_char = '│'
"char = '·",
let g:indent_blankline_space_char = '·'
let g:indent_blankline_show_trailing_blankline_indent = v:false
let g:indent_blankline_show_first_indent_level = v:false
let g:indent_blankline_show_current_context = v:true
let g:indent_blankline_use_treesitter = v:true
let g:indent_blankline_buftype_exclude = [ 'terminal', 'telescope' ]
let g:indent_blankline_filetype_exclude = [ 'help', 'startify', 'dashboard', 'packer', 'neogitstatus', 'NvimTree', 'Trouble' ]
let g:indent_blankline_context_patterns = [ 'def', 'class', 'return', 'function', 'method', '^if', '^while', 'jsx_element', '^for', '^object', '^table', 'block', 'arguments', 'if_statement', 'else_clause', 'jsx_element', 'jsx_self_closing_element', 'try_statement', 'catch_clause', 'import_statement', 'operation_type' ]

Neovim version:

NVIM v0.6.0-dev+207-g684550ff3
Build type: Release
LuaJIT 2.1.0-beta3

Code example: image

As you can see, space char is not showing.

Daxtorim commented 3 years ago

space_charwas removed in favour of vim's listchars space value. If you don't want to show a special character for all spaces globally, Neovim has a special listchars lead option, that will only be used for leading whitespace. You can add that character in your init.lua like so:

vim.opt.listchars:append({lead="."})

(I don't know if this works with Neovim 0.5.x, but you are already on 0.6.x where it definitely does work)

In general, since #190, all characters are sourced through the listchars values, so also eol and the tab values will be taken from there and shown when appropriate.

luisiacc commented 3 years ago

space_charwas removed in favour of vim's listchars space value. If you don't want to show a special character for all spaces globally, Neovim has a special listchars lead option, that will only be used for leading whitespace. You can add that character in your init.lua like so:

vim.opt.listchars:append({lead="."})

(I don't know if this works with Neovim 0.5.x, but you are already on 0.6.x where it definitely does work)

In general, since #190, all characters are sourced through the listchars values, so also eol and the tab values will be taken from there and shown when appropriate.

Thanks!