diff --git a/autoload/coc/util.vim b/autoload/coc/util.vim index 367d0cc8e92..7ea1c4260e0 100644 --- a/autoload/coc/util.vim +++ b/autoload/coc/util.vim @@ -525,7 +525,13 @@ function! coc#util#get_config_home() if s:is_win return resolve($HOME."/vimfiles") endif - return resolve($HOME.'/.vim') + if isdirectory(resolve($HOME.'/.vim')) + return resolve($HOME.'/.vim') + endif + if exists('$XDG_CONFIG_HOME') && isdirectory(resolve($XDG_CONFIG_HOME)) + return resolve($XDG_CONFIG_HOME.'/vim') + endif + return resolve($HOME.'/.config/vim') endif endfunction