From d8173135d0bcd9a8f627d225ab310ffb21fa3936 Mon Sep 17 00:00:00 2001 From: Phong Nguyen Date: Wed, 5 Jul 2023 09:27:09 +0700 Subject: [PATCH] Remove unnecessary variables for autoload sources --- autoload/easycomplete/sources/bash.vim | 5 ----- autoload/easycomplete/sources/cmake.vim | 5 ----- autoload/easycomplete/sources/cpp.vim | 5 ----- autoload/easycomplete/sources/cs.vim | 5 ----- autoload/easycomplete/sources/css.vim | 5 ----- autoload/easycomplete/sources/dart.vim | 5 ----- autoload/easycomplete/sources/deno.vim | 4 ---- autoload/easycomplete/sources/go.vim | 5 ----- autoload/easycomplete/sources/grvy.vim | 5 ----- autoload/easycomplete/sources/html.vim | 5 ----- autoload/easycomplete/sources/java.vim | 5 ----- autoload/easycomplete/sources/json.vim | 5 ----- autoload/easycomplete/sources/kotlin.vim | 5 ----- autoload/easycomplete/sources/lua.vim | 5 ----- autoload/easycomplete/sources/nim.vim | 5 ----- autoload/easycomplete/sources/php.vim | 5 ----- autoload/easycomplete/sources/py.vim | 5 ----- autoload/easycomplete/sources/r.vim | 5 ----- autoload/easycomplete/sources/ruby.vim | 5 ----- autoload/easycomplete/sources/rust.vim | 6 ------ autoload/easycomplete/sources/tn.vim | 5 ----- autoload/easycomplete/sources/ts.vim | 5 ----- autoload/easycomplete/sources/vim.vim | 5 ----- autoload/easycomplete/sources/xml.vim | 5 ----- autoload/easycomplete/sources/yaml.vim | 5 ----- 25 files changed, 125 deletions(-) diff --git a/autoload/easycomplete/sources/bash.vim b/autoload/easycomplete/sources/bash.vim index f03c3131..0e3ce791 100644 --- a/autoload/easycomplete/sources/bash.vim +++ b/autoload/easycomplete/sources/bash.vim @@ -1,8 +1,3 @@ -if exists('g:easycomplete_bash') - finish -endif -let g:easycomplete_bash = 1 - function! easycomplete#sources#bash#constructor(opt, ctx) call easycomplete#RegisterLspServer(a:opt, { \ 'name': 'bashls', diff --git a/autoload/easycomplete/sources/cmake.vim b/autoload/easycomplete/sources/cmake.vim index a7d2f914..1b27cbdc 100644 --- a/autoload/easycomplete/sources/cmake.vim +++ b/autoload/easycomplete/sources/cmake.vim @@ -1,8 +1,3 @@ -if get(g:, 'easycomplete_sources_cmake') - finish -endif -let g:easycomplete_sources_cmake = 1 - " TODO 仍未调通,应该是 cmake-languageserver 本身的 bug " 参考:https://github.com/regen100/cmake-language-server/issues/9 function! easycomplete#sources#cmake#constructor(opt, ctx) diff --git a/autoload/easycomplete/sources/cpp.vim b/autoload/easycomplete/sources/cpp.vim index 76b0bd55..3a22336c 100644 --- a/autoload/easycomplete/sources/cpp.vim +++ b/autoload/easycomplete/sources/cpp.vim @@ -1,8 +1,3 @@ -if get(g:, 'easycomplete_sources_cpp') - finish -endif -let g:easycomplete_sources_cpp = 1 - function! easycomplete#sources#cpp#constructor(opt, ctx) call easycomplete#RegisterLspServer(a:opt, { \ 'name': 'clangd', diff --git a/autoload/easycomplete/sources/cs.vim b/autoload/easycomplete/sources/cs.vim index 90c72527..de0bcb6a 100644 --- a/autoload/easycomplete/sources/cs.vim +++ b/autoload/easycomplete/sources/cs.vim @@ -1,8 +1,3 @@ -if exists('g:easycomplete_cs') - finish -endif -let g:easycomplete_cs = 1 - function! easycomplete#sources#cs#constructor(opt, ctx) call easycomplete#RegisterLspServer(a:opt, { \ 'name': 'omnisharp-lsp', diff --git a/autoload/easycomplete/sources/css.vim b/autoload/easycomplete/sources/css.vim index 72967db2..b912f415 100644 --- a/autoload/easycomplete/sources/css.vim +++ b/autoload/easycomplete/sources/css.vim @@ -1,8 +1,3 @@ -if exists('g:easycomplete_css') - finish -endif -let g:easycomplete_css = 1 - function! easycomplete#sources#css#constructor(opt, ctx) call easycomplete#RegisterLspServer(a:opt, { \ 'name': 'cssls', diff --git a/autoload/easycomplete/sources/dart.vim b/autoload/easycomplete/sources/dart.vim index b850d5d3..d426aed1 100644 --- a/autoload/easycomplete/sources/dart.vim +++ b/autoload/easycomplete/sources/dart.vim @@ -1,8 +1,3 @@ -if exists('g:easycomplete_dart') - finish -endif -let g:easycomplete_dart = 1 - function! easycomplete#sources#dart#constructor(opt, ctx) call easycomplete#RegisterLspServer(a:opt, { \ 'name': 'dartls', diff --git a/autoload/easycomplete/sources/deno.vim b/autoload/easycomplete/sources/deno.vim index 90633286..1a5f1865 100644 --- a/autoload/easycomplete/sources/deno.vim +++ b/autoload/easycomplete/sources/deno.vim @@ -1,7 +1,3 @@ -if get(g:, 'easycomplete_sources_deno') - finish -endif -let g:easycomplete_sources_deno = 1 let s:file_extensions = ["js","jsx","ts","tsx","mjs","ejs"] function! easycomplete#sources#deno#constructor(opt, ctx) diff --git a/autoload/easycomplete/sources/go.vim b/autoload/easycomplete/sources/go.vim index f54090d5..0450e047 100644 --- a/autoload/easycomplete/sources/go.vim +++ b/autoload/easycomplete/sources/go.vim @@ -1,8 +1,3 @@ -if exists('g:easycomplete_gopls') - finish -endif -let g:easycomplete_gopls = 1 - function! easycomplete#sources#go#constructor(opt, ctx) call easycomplete#RegisterLspServer(a:opt, { \ 'name': 'gopls', diff --git a/autoload/easycomplete/sources/grvy.vim b/autoload/easycomplete/sources/grvy.vim index fd90d81b..c4bb9fa7 100644 --- a/autoload/easycomplete/sources/grvy.vim +++ b/autoload/easycomplete/sources/grvy.vim @@ -1,8 +1,3 @@ -if get(g:, 'easycomplete_sources_grvy') - finish -endif -let g:easycomplete_sources_grvy = 1 - function! easycomplete#sources#grvy#constructor(opt, ctx) call easycomplete#RegisterLspServer(a:opt, { \ 'name': 'groovyls', diff --git a/autoload/easycomplete/sources/html.vim b/autoload/easycomplete/sources/html.vim index 7f5f8644..288346b1 100644 --- a/autoload/easycomplete/sources/html.vim +++ b/autoload/easycomplete/sources/html.vim @@ -1,8 +1,3 @@ -if get(g:, 'easycomplete_sources_html') - finish -endif -let g:easycomplete_sources_html= 1 - function! easycomplete#sources#html#constructor(opt, ctx) call easycomplete#RegisterLspServer(a:opt, { \ 'name': 'html', diff --git a/autoload/easycomplete/sources/java.vim b/autoload/easycomplete/sources/java.vim index 4234e76f..10e4198a 100644 --- a/autoload/easycomplete/sources/java.vim +++ b/autoload/easycomplete/sources/java.vim @@ -1,8 +1,3 @@ -if get(g:, 'easycomplete_sources_java') - finish -endif -let g:easycomplete_sources_java = 1 - function! easycomplete#sources#java#constructor(opt, ctx) " 注册 lsp call easycomplete#RegisterLspServer(a:opt, { diff --git a/autoload/easycomplete/sources/json.vim b/autoload/easycomplete/sources/json.vim index 9cdbdcf3..c247404a 100644 --- a/autoload/easycomplete/sources/json.vim +++ b/autoload/easycomplete/sources/json.vim @@ -1,8 +1,3 @@ -if exists('g:easycomplete_json') - finish -endif -let g:easycomplete_json = 1 - function! easycomplete#sources#json#constructor(opt, ctx) call easycomplete#RegisterLspServer(a:opt, { \ 'name': 'jsonls', diff --git a/autoload/easycomplete/sources/kotlin.vim b/autoload/easycomplete/sources/kotlin.vim index e3a94b4c..b37402b7 100644 --- a/autoload/easycomplete/sources/kotlin.vim +++ b/autoload/easycomplete/sources/kotlin.vim @@ -1,8 +1,3 @@ -if exists('g:easycomplete_kotlin') - finish -endif -let g:easycomplete_kotlin = 1 - function! easycomplete#sources#kotlin#constructor(opt, ctx) call easycomplete#RegisterLspServer(a:opt, { \ 'name': 'kotlin_language_server', diff --git a/autoload/easycomplete/sources/lua.vim b/autoload/easycomplete/sources/lua.vim index fa0c9d75..5f2900be 100644 --- a/autoload/easycomplete/sources/lua.vim +++ b/autoload/easycomplete/sources/lua.vim @@ -1,8 +1,3 @@ -if get(g:, 'easycomplete_sources_lua') - finish -endif -let g:easycomplete_sources_lua = 1 - let g:sumneko_lua_language_server_workspace_config = { \ 'Lua': { \ 'color': { diff --git a/autoload/easycomplete/sources/nim.vim b/autoload/easycomplete/sources/nim.vim index fefed883..590734bc 100644 --- a/autoload/easycomplete/sources/nim.vim +++ b/autoload/easycomplete/sources/nim.vim @@ -1,8 +1,3 @@ -if exists('g:easycomplete_nim') - finish -endif -let g:easycomplete_nim = 1 - function! easycomplete#sources#nim#constructor(opt, ctx) call easycomplete#RegisterLspServer(a:opt, { \ 'name': 'nimls', diff --git a/autoload/easycomplete/sources/php.vim b/autoload/easycomplete/sources/php.vim index b3b69c94..a8cbf561 100644 --- a/autoload/easycomplete/sources/php.vim +++ b/autoload/easycomplete/sources/php.vim @@ -1,8 +1,3 @@ -if exists('g:easycomplete_sources_php') - finish -endif -let g:easycomplete_sources_php = 1 - function! easycomplete#sources#php#constructor(opt, ctx) call easycomplete#RegisterLspServer(a:opt, { \ 'name': 'intelephense', diff --git a/autoload/easycomplete/sources/py.vim b/autoload/easycomplete/sources/py.vim index 5510e734..d9a6dc9f 100644 --- a/autoload/easycomplete/sources/py.vim +++ b/autoload/easycomplete/sources/py.vim @@ -1,8 +1,3 @@ -if get(g:, 'easycomplete_sources_py') - finish -endif -let g:easycomplete_sources_py = 1 - function! easycomplete#sources#py#constructor(opt, ctx) call easycomplete#RegisterLspServer(a:opt, { \ 'name': 'pylsp', diff --git a/autoload/easycomplete/sources/r.vim b/autoload/easycomplete/sources/r.vim index 60ae5463..ae450539 100644 --- a/autoload/easycomplete/sources/r.vim +++ b/autoload/easycomplete/sources/r.vim @@ -1,8 +1,3 @@ -if get(g:, 'easycomplete_sources_r') - finish -endif -let g:easycomplete_sources_r = 1 - function! easycomplete#sources#r#constructor(opt, ctx) call easycomplete#RegisterLspServer(a:opt, { \ 'name': 'r-languageserver', diff --git a/autoload/easycomplete/sources/ruby.vim b/autoload/easycomplete/sources/ruby.vim index 46fd0c15..75e7ca41 100644 --- a/autoload/easycomplete/sources/ruby.vim +++ b/autoload/easycomplete/sources/ruby.vim @@ -1,8 +1,3 @@ -if exists('g:easycomplete_rb') - finish -endif -let g:easycomplete_rb = 1 - function! easycomplete#sources#ruby#constructor(opt, ctx) call easycomplete#RegisterLspServer(a:opt, { \ 'name': 'solargraph', diff --git a/autoload/easycomplete/sources/rust.vim b/autoload/easycomplete/sources/rust.vim index d04189d5..f2c227aa 100644 --- a/autoload/easycomplete/sources/rust.vim +++ b/autoload/easycomplete/sources/rust.vim @@ -1,9 +1,3 @@ - -if exists('g:easycomplete_rust') - finish -endif -let g:easycomplete_rust = 1 - function! easycomplete#sources#rust#constructor(opt, ctx) call easycomplete#RegisterLspServer(a:opt, { \ 'name': 'rust_analyzer', diff --git a/autoload/easycomplete/sources/tn.vim b/autoload/easycomplete/sources/tn.vim index af5bdc05..71bf2f36 100644 --- a/autoload/easycomplete/sources/tn.vim +++ b/autoload/easycomplete/sources/tn.vim @@ -1,8 +1,3 @@ -if exists('g:easycomplete_tn') - finish -endif -let g:easycomplete_tn = 1 - let s:tn_job = v:null let s:ctx = v:null let s:opt = v:null diff --git a/autoload/easycomplete/sources/ts.vim b/autoload/easycomplete/sources/ts.vim index b0170bce..21a3272e 100644 --- a/autoload/easycomplete/sources/ts.vim +++ b/autoload/easycomplete/sources/ts.vim @@ -1,8 +1,3 @@ -if get(g:, 'easycomplete_sources_ts') - finish -endif -let g:easycomplete_sources_ts = 1 - augroup easycomplete#sources#ts#InitLocalVars " 正在运行中的 job 指针 " { diff --git a/autoload/easycomplete/sources/vim.vim b/autoload/easycomplete/sources/vim.vim index 5f51e835..a8953531 100644 --- a/autoload/easycomplete/sources/vim.vim +++ b/autoload/easycomplete/sources/vim.vim @@ -1,8 +1,3 @@ -if get(g:, 'easycomplete_sources_vim') - finish -endif -let g:easycomplete_sources_vim = 1 - function! easycomplete#sources#vim#constructor(opt, ctx) call easycomplete#RegisterLspServer(a:opt, { \ 'name': 'vimls', diff --git a/autoload/easycomplete/sources/xml.vim b/autoload/easycomplete/sources/xml.vim index 5c15fc9d..23340cd3 100644 --- a/autoload/easycomplete/sources/xml.vim +++ b/autoload/easycomplete/sources/xml.vim @@ -1,8 +1,3 @@ -if get(g:, 'easycomplete_sources_xml') - finish -endif -let g:easycomplete_sources_xml = 1 - function! easycomplete#sources#xml#constructor(opt, ctx) call easycomplete#RegisterLspServer(a:opt, { \ 'name': 'lemminx', diff --git a/autoload/easycomplete/sources/yaml.vim b/autoload/easycomplete/sources/yaml.vim index e6385430..39103116 100644 --- a/autoload/easycomplete/sources/yaml.vim +++ b/autoload/easycomplete/sources/yaml.vim @@ -1,8 +1,3 @@ -if get(g:, 'easycomplete_sources_yaml') - finish -endif -let g:easycomplete_sources_yaml = 1 - function! easycomplete#sources#yaml#constructor(opt, ctx) call easycomplete#RegisterLspServer(a:opt, { \ 'name': 'yamlls',