diff options
author | Yasuhiro Matsumoto <mattn.jp@gmail.com> | 2020-02-11 22:41:40 +0900 |
---|---|---|
committer | Yasuhiro Matsumoto <mattn.jp@gmail.com> | 2020-02-11 22:41:40 +0900 |
commit | c69a2666210f31d52823a4a3faacaeaff732ae3f (patch) | |
tree | 8f26f66c253ddef85497cb7fafe5e55f7ab0e21a | |
parent | 09d70add97397ab896614dcd03275c57ef18013d (diff) | |
download | vim-lsp-settings-c69a2666210f31d52823a4a3faacaeaff732ae3f.tar.gz vim-lsp-settings-c69a2666210f31d52823a4a3faacaeaff732ae3f.tar.bz2 vim-lsp-settings-c69a2666210f31d52823a4a3faacaeaff732ae3f.zip |
Show uninstalling message
-rw-r--r-- | autoload/lsp_settings.vim | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/autoload/lsp_settings.vim b/autoload/lsp_settings.vim index 3b78c66..913c798 100644 --- a/autoload/lsp_settings.vim +++ b/autoload/lsp_settings.vim @@ -9,6 +9,10 @@ call remove(s:settings, '$schema') let s:ftmap = {} +function! lsp_settings#installer_dir() abort + return s:installer_dir +endfunction + function! lsp_settings#servers_dir() abort let l:path = fnamemodify(get(g:, 'lsp_settings_servers_dir', s:servers_dir), ':p') if has('win32') @@ -176,9 +180,13 @@ function! lsp_settings#autocd(server_info) abort endif endfunction +function! lsp_settings#settings() abort + return s:settings +endfunction + function! lsp_settings#complete_uninstall(arglead, cmdline, cursorpos) abort let l:installers = [] - for l:ft in keys(s:settings) + for l:ft in sort(keys(s:settings)) for l:conf in s:settings[l:ft] if !isdirectory(lsp_settings#servers_dir() . '/' . l:conf.command) continue @@ -272,6 +280,7 @@ function! s:vim_lsp_install_server(ft, command) abort endif let l:server_install_dir = lsp_settings#servers_dir() . '/' . l:entry[0] if isdirectory(l:server_install_dir) + call lsp_settings#utils#msg('Uninstalling ' . l:entry[0]) call delete(l:server_install_dir, 'rf') endif call mkdir(l:server_install_dir, 'p') |