mirror of
https://github.com/preservim/vim-indent-guides.git
synced 2025-11-10 10:53:47 -05:00
feat: Add option to check buftype option before enabling
Closes #101 Instead of only having a big list of "naughty" filetypes, have an option to check for the `buftype` and skip if set to anything.
This commit is contained in:
@@ -284,6 +284,11 @@ endfunction
|
||||
" Detect if any of the buffer filetypes should be excluded.
|
||||
"
|
||||
function! indent_guides#exclude_filetype() abort
|
||||
if exists('g:indent_guides_exclude_buftype')
|
||||
if g:indent_guides_exclude_buftype && &buftype != ''
|
||||
return 1
|
||||
endif
|
||||
endif
|
||||
for ft in split(&ft, '\.')
|
||||
if index(g:indent_guides_exclude_filetypes, ft) > -1
|
||||
return 1
|
||||
|
||||
Reference in New Issue
Block a user