From 3b275bb7cafd7d77be5fd3cf8d46eaa3a7deddf3 Mon Sep 17 00:00:00 2001 From: Michael Lingelbach Date: Wed, 5 Jan 2022 11:04:18 -0800 Subject: chore: remove healthcheck (#1636) Previously, lspconfig had a recommended healthcheck. This was mostly noise as its predominant use was to check if a server was installed. This check was not accurate as vim.fn.executable is extremely primitive and does not consider cmd_env (forwarded to uv_spawn) or language servers that are run via an interpreter. Furthermore, checking if a language server is executable will no longer be a useful signal once TCP support (which allows for connecting to already running or remote servers). Remove for now. --- .github/ISSUE_TEMPLATE/bug_report.yml | 6 ------ autoload/health/lspconfig.vim | 4 ---- lua/lspconfig/health.lua | 28 ---------------------------- 3 files changed, 38 deletions(-) delete mode 100644 autoload/health/lspconfig.vim delete mode 100644 lua/lspconfig/health.lua diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index d760b1bb..0fe9c1f6 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -66,12 +66,6 @@ body: description: "You can download a minimal_init.lua via `curl -fLO https://raw.githubusercontent.com/neovim/nvim-lspconfig/master/test/minimal_init.lua`. Then edit it to include your language server and add necessary configuration and paste it here." validations: required: true - - type: textarea - attributes: - label: "Health check" - description: "Run `:checkhealth lspconfig` and paste the results here." - validations: - required: true - type: input attributes: label: "LSP log" diff --git a/autoload/health/lspconfig.vim b/autoload/health/lspconfig.vim deleted file mode 100644 index a7277980..00000000 --- a/autoload/health/lspconfig.vim +++ /dev/null @@ -1,4 +0,0 @@ -function! health#lspconfig#check() - call health#report_start('Checking language server protocol configuration') - lua require 'lspconfig.health'.check() -endfunction diff --git a/lua/lspconfig/health.lua b/lua/lspconfig/health.lua deleted file mode 100644 index 1adbe9d2..00000000 --- a/lua/lspconfig/health.lua +++ /dev/null @@ -1,28 +0,0 @@ -local M = {} -function M.check() - local configs = require 'lspconfig.configs' - - if not configs or vim.tbl_count(configs) == 0 then - vim.fn['health#report_warn'] [[Can't find any config.]] - end - for _, top_level_config in pairs(configs) do - -- Only check configs that have a make_config function. - if not (top_level_config.make_config == nil) then - -- the folder needs to exist - local config = top_level_config.make_config '.' - - local status, cmd = pcall(vim.lsp._cmd_parts, config.cmd) - if not status then - vim.fn['health#report_error'](string.format('%s: config.cmd error, %s', config.name, cmd)) - else - if not (vim.fn.executable(cmd) == 1) then - vim.fn['health#report_error'](string.format('%s: The given command %q is not executable.', config.name, cmd)) - else - vim.fn['health#report_info'](string.format('%s: configuration checked.', config.name)) - end - end - end - end -end - -return M -- cgit v1.2.3-70-g09d2