From 8b55636b2cbfb6684ad92a45317e2489946bfd93 Mon Sep 17 00:00:00 2001 From: Cimbali Date: Thu, 11 Jan 2018 09:21:56 +0100 Subject: [PATCH] Respect global YAPF config file --- plugin/defaults.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/defaults.vim b/plugin/defaults.vim index ea3ba7a..9bd00f9 100644 --- a/plugin/defaults.vim +++ b/plugin/defaults.vim @@ -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')