neovim: add leadmultispace to listchars

This commit is contained in:
2023-10-22 12:32:00 +03:00
parent 6bae7385cd
commit 49f361a6ae
3 changed files with 13 additions and 1 deletions

View File

@@ -0,0 +1 @@
require("daniil.utils").adjust_leadmultispace()

View File

@@ -35,6 +35,6 @@ vim.opt.smartcase = true
vim.opt.ignorecase = true
vim.opt.list = true
vim.opt.listchars = { multispace = "·", tab = ">~" }
vim.opt.listchars = { multispace = "·", tab = ">~", leadmultispace = "" }
vim.cmd("colorscheme gruvbox-material")

View File

@@ -0,0 +1,11 @@
local M = {}
function M.adjust_leadmultispace()
local lead = ""
for _ = 1, vim.bo.shiftwidth - 1 do
lead = lead .. " "
end
vim.opt_local.listchars:append({ leadmultispace = lead })
end
return M