aboutsummaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authorYasuhiro Matsumoto <mattn.jp@gmail.com>2020-03-06 15:39:01 +0900
committerYasuhiro Matsumoto <mattn.jp@gmail.com>2020-03-06 15:40:38 +0900
commit9be9b69efee5f86905ee2af6e18cf11f81d14f15 (patch)
tree74d1c69f0aa06be16f29b35ecd9c7dec1ce77a18 /autoload
parentbb0864302d0bf412c1fc833420aa2b17d9928458 (diff)
downloadvim-lsp-settings-9be9b69efee5f86905ee2af6e18cf11f81d14f15.tar.gz
vim-lsp-settings-9be9b69efee5f86905ee2af6e18cf11f81d14f15.tar.bz2
vim-lsp-settings-9be9b69efee5f86905ee2af6e18cf11f81d14f15.zip
If $XDG_CONFIG_HOME is defined, use it.
Diffstat (limited to 'autoload')
-rw-r--r--autoload/lsp_settings.vim4
1 files changed, 3 insertions, 1 deletions
diff --git a/autoload/lsp_settings.vim b/autoload/lsp_settings.vim
index 6e2ad38..3b10715 100644
--- a/autoload/lsp_settings.vim
+++ b/autoload/lsp_settings.vim
@@ -5,8 +5,10 @@ let s:root_dir = expand('<sfile>:h:h')
if has('win32')
let s:servers_dir = expand('$LOCALAPPDATA/vim-lsp-settings/servers')
+elseif $XDG_DATA_HOME != ''
+ let s:servers_dir = expand('$XDG_DATA_HOME/vim-lsp-settings/servers')
else
- let s:servers_dir = expand('~/.config/vim-lsp-settings/servers')
+ let s:servers_dir = expand('~/.local/share/vim-lsp-settings/servers')
endif
let s:settings = json_decode(join(readfile(expand('<sfile>:h:h') . '/settings.json'), "\n"))