We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f828912 commit 113f9b8Copy full SHA for 113f9b8
ftdetect/polyglot.vim
@@ -2638,6 +2638,8 @@ if !has_key(s:disabled_packages, 'autoindent')
2638
let &tabstop = 2
2639
endif
2640
2641
+ let s:default_shiftwidth = &shiftwidth
2642
+
2643
func! s:get_shiftwidth(indents) abort
2644
let shiftwidth = 0
2645
let max_count = 0
@@ -2788,8 +2790,8 @@ if !has_key(s:disabled_packages, 'autoindent')
2788
2790
return
2789
2791
2792
- " Do not autodetect indent if language sets it
- if &l:shiftwidth != &g:shiftwidth
2793
+ " Do not autodetect indent if language or user sets it
2794
+ if &l:shiftwidth != s:default_shiftwidth
2795
2796
2797
0 commit comments