Skip to content

Commit

Permalink
Add option for first level of indent guides (default to 0).
Browse files Browse the repository at this point in the history
  • Loading branch information
thaerkh committed Feb 4, 2017
1 parent ed6b052 commit 8310c98
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion plugin/workspace.vim
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ let g:workspace_autosave_au_updatetime = get(g:, 'workspace_autosave_au_updateti
let g:workspace_sensible_settings = get(g:, 'workspace_sensible_settings', 0)
let g:workspace_autocreate = get(g:, 'workspace_autocreate', 0)
let g:workspace_indentguides = get(g:, 'workspace_indentguides', 0)
let g:workspace_indentguides_firstlevel = get(g:, 'workspace_indentguides_firstlevel', 0)
let g:workspace_indentguides_ignore = get(g:, 'workspace_indentguides_ignore', [])


Expand Down Expand Up @@ -206,7 +207,10 @@ function! s:SetIndentGuideHighlights(user_initiated)
endif
execute "highlight Conceal ctermfg=238 ctermbg=NONE guifg=Grey27 guibg=NONE"
execute "highlight SpecialKey ctermfg=238 ctermbg=NONE guifg=Grey27 guibg=NONE"
execute printf('syntax match IndentGuideDraw /^\zs\ \ze\ \{%i}/ containedin=ALL conceal cchar=┆', &l:shiftwidth - 1)

if g:workspace_indentguides_firstlevel
execute printf('syntax match IndentGuideDraw /^\zs\ \ze\ \{%i}/ containedin=ALL conceal cchar=┆', &l:shiftwidth - 1)
endif
execute 'syntax match IndentGuideSpaces /^\ \+/ containedin=ALL contains=IndentGuideDraw keepend'
execute printf('syntax match IndentGuideDraw /\ \{%i}\zs \ze/ contained conceal cchar=┆', &l:shiftwidth - 1)
endif
Expand Down

0 comments on commit 8310c98

Please sign in to comment.