diff options
| author | William Boman <william@redwill.se> | 2022-07-06 19:41:43 +0200 |
|---|---|---|
| committer | William Boman <william@redwill.se> | 2022-07-07 00:39:59 +0200 |
| commit | 5f634e0c37e723fc0c33e06b4fd5c2180178db40 (patch) | |
| tree | fa4f09363adefa8259e23e4d1ea036db628b1243 /plugin | |
| parent | feat(health): use stderr for java version, also check for JAVA_HOME (#765) (diff) | |
| download | mason-5f634e0c37e723fc0c33e06b4fd5c2180178db40.tar mason-5f634e0c37e723fc0c33e06b4fd5c2180178db40.tar.gz mason-5f634e0c37e723fc0c33e06b4fd5c2180178db40.tar.bz2 mason-5f634e0c37e723fc0c33e06b4fd5c2180178db40.tar.lz mason-5f634e0c37e723fc0c33e06b4fd5c2180178db40.tar.xz mason-5f634e0c37e723fc0c33e06b4fd5c2180178db40.tar.zst mason-5f634e0c37e723fc0c33e06b4fd5c2180178db40.zip | |
mason.nvim
Diffstat (limited to 'plugin')
| -rw-r--r-- | plugin/nvim-lsp-installer.vim | 82 |
1 files changed, 0 insertions, 82 deletions
diff --git a/plugin/nvim-lsp-installer.vim b/plugin/nvim-lsp-installer.vim deleted file mode 100644 index 3829384c..00000000 --- a/plugin/nvim-lsp-installer.vim +++ /dev/null @@ -1,82 +0,0 @@ -if exists('g:loaded_nvim_lsp_installer') | finish | endif -let g:loaded_nvim_lsp_installer = v:true - -let s:save_cpo = &cpo -set cpo&vim - -let s:no_confirm_flag = "--no-confirm" - -function! s:LspInstallCompletion(...) abort - return join(sort(luaeval("require'nvim-lsp-installer'.get_install_completion()")), "\n") -endfunction - -function! s:LspUninstallCompletion(...) abort - return join(sort(luaeval("require'nvim-lsp-installer.servers'.get_installed_server_names()")), "\n") -endfunction - -function! s:LspUninstallAllCompletion(...) abort - return s:no_confirm_flag -endfunction - -function! s:ParseArgs(args) - if len(a:args) == 0 - return { 'sync': v:false, 'servers': [] } - endif - let sync = a:args[0] == "--sync" - let servers = sync ? a:args[1:] : a:args - return { 'sync': sync, 'servers': servers } -endfunction - -function! s:LspInstall(args) abort - let parsed_args = s:ParseArgs(a:args) - if parsed_args.sync - call luaeval("require'nvim-lsp-installer'.install_sync(_A)", parsed_args.servers) - else - if len(parsed_args.servers) == 0 - call luaeval("require'nvim-lsp-installer'.install_by_filetype(_A)", &filetype) - else - for server_name in l:parsed_args.servers - call luaeval("require'nvim-lsp-installer'.install(_A)", server_name) - endfor - endif - endif -endfunction - -function! s:LspUninstall(args) abort - let parsed_args = s:ParseArgs(a:args) - if parsed_args.sync - call luaeval("require'nvim-lsp-installer'.uninstall_sync(_A)", parsed_args.servers) - else - for server_name in l:parsed_args.servers - call luaeval("require'nvim-lsp-installer'.uninstall(_A)", server_name) - endfor - endif -endfunction - -function! s:LspUninstallAll(args) abort - let no_confirm = get(a:args, 0, "") == s:no_confirm_flag - call luaeval("require'nvim-lsp-installer'.uninstall_all(_A)", no_confirm ? v:true : v:false) -endfunction - -function! s:LspPrintInstalled() abort - echo luaeval("require'nvim-lsp-installer.servers'.get_installed_server_names()") -endfunction - -function! s:LspInstallInfo() abort - lua require'nvim-lsp-installer'.info_window.open() -endfunction - -function! s:LspInstallLog() abort - exe 'tabnew ' .. luaeval("require'nvim-lsp-installer.log'.outfile") -endfunction - -command! -bar -nargs=* -complete=custom,s:LspInstallCompletion LspInstall call s:LspInstall([<f-args>]) -command! -bar -nargs=+ -complete=custom,s:LspUninstallCompletion LspUninstall call s:LspUninstall([<f-args>]) -command! -bar -nargs=? -complete=custom,s:LspUninstallAllCompletion LspUninstallAll call s:LspUninstallAll([<f-args>]) - -command! LspPrintInstalled call s:LspPrintInstalled() -command! LspInstallInfo call s:LspInstallInfo() -command! LspInstallLog call s:LspInstallLog() - -let &cpo = s:save_cpo -unlet s:save_cpo |
