Skip to content
This repository was archived by the owner on May 29, 2023. It is now read-only.

Commit 8310c98

Browse files
committed
Add option for first level of indent guides (default to 0).
1 parent ed6b052 commit 8310c98

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

plugin/workspace.vim

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ let g:workspace_autosave_au_updatetime = get(g:, 'workspace_autosave_au_updateti
1313
let g:workspace_sensible_settings = get(g:, 'workspace_sensible_settings', 0)
1414
let g:workspace_autocreate = get(g:, 'workspace_autocreate', 0)
1515
let g:workspace_indentguides = get(g:, 'workspace_indentguides', 0)
16+
let g:workspace_indentguides_firstlevel = get(g:, 'workspace_indentguides_firstlevel', 0)
1617
let g:workspace_indentguides_ignore = get(g:, 'workspace_indentguides_ignore', [])
1718

1819

@@ -206,7 +207,10 @@ function! s:SetIndentGuideHighlights(user_initiated)
206207
endif
207208
execute "highlight Conceal ctermfg=238 ctermbg=NONE guifg=Grey27 guibg=NONE"
208209
execute "highlight SpecialKey ctermfg=238 ctermbg=NONE guifg=Grey27 guibg=NONE"
209-
execute printf('syntax match IndentGuideDraw /^\zs\ \ze\ \{%i}/ containedin=ALL conceal cchar=┆', &l:shiftwidth - 1)
210+
211+
if g:workspace_indentguides_firstlevel
212+
execute printf('syntax match IndentGuideDraw /^\zs\ \ze\ \{%i}/ containedin=ALL conceal cchar=┆', &l:shiftwidth - 1)
213+
endif
210214
execute 'syntax match IndentGuideSpaces /^\ \+/ containedin=ALL contains=IndentGuideDraw keepend'
211215
execute printf('syntax match IndentGuideDraw /\ \{%i}\zs \ze/ contained conceal cchar=┆', &l:shiftwidth - 1)
212216
endif

0 commit comments

Comments
 (0)