neovim: add leadmultispace to listchars
This commit is contained in:
1
neovim/.config/nvim/after/ftplugin/python.lua
Normal file
1
neovim/.config/nvim/after/ftplugin/python.lua
Normal file
@@ -0,0 +1 @@
|
||||
require("daniil.utils").adjust_leadmultispace()
|
||||
@@ -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")
|
||||
|
||||
11
neovim/.config/nvim/lua/daniil/utils.lua
Normal file
11
neovim/.config/nvim/lua/daniil/utils.lua
Normal 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
|
||||
Reference in New Issue
Block a user