Merge pull request #222 from Cimbali/master

Respect global YAPF config file
This commit is contained in:
Chiel ten Brinke 2018-01-11 10:00:37 +01:00 committed by GitHub
commit d2161ef6a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -49,7 +49,7 @@ if !exists('g:formatdef_yapf')
endif
function! g:YAPFFormatConfigFileExists()
return len(findfile(".style.yapf", expand("%:p:h").";")) || len(findfile("setup.cfg", expand("%:p:h").";"))
return len(findfile(".style.yapf", expand("%:p:h").";")) || len(findfile("setup.cfg", expand("%:p:h").";")) || filereadable(exists('$XDG_CONFIG_HOME') ? expand('$XDG_CONFIG_HOME/yapf/style') : expand('~/.config/yapf/style'))
endfunction
if !exists('g:formatters_python')