Open jcmunozo opened 1 year ago
Yes. You may use the following vimscript to disable indentline
on your dashboard buffer.
augroup disableIndentlineDb
autocmd!
au FileType dashboard let b:indentLine_enabled = 0
augroup END
Check :help ft
, :help au
for more information
thank you for your reply, i am using Lua, so in the end I used this vim.cmd([[ autocmd User AlphaReady :IndentLinesDisable ]])
in the "goolord/apha-nvm" configuration. What do you think about it? is it a bad practice?
You'd better use
vim.cmd[[
augroup disableIndentlineDb
autocmd! -- clear cmds in this group first to avoid duplication
au FileType dashboard let b:indentLine_enabled = 0
augroup END
]]
Every time you source your configuration. autocmd
will register a new autocommand which may result in conflicts and performance degradation as mentioned in :h au
:
:autocmd
adds to the list of autocommands regardless of whether they are already present. When your .vimrc file is sourced twice, the autocommands will appear twice. To avoid this, define your autocommands in a group.
Besides, if you are preferable to a lua-style configuration for autocommands, please refer to :h nvim_create_autocmd
thanks, I will implement it, :)
There is any way to disable for filestype? the indent lines is render on my dashboard :(