diff options
| -rw-r--r-- | doc/nvim-lsp-installer.txt | 21 | ||||
| -rw-r--r-- | lua/nvim-lsp-installer/core/managers/github/init.lua | 2 | ||||
| -rw-r--r-- | lua/nvim-lsp-installer/core/spawn.lua | 2 | ||||
| -rw-r--r-- | lua/nvim-lsp-installer/jobs/outdated-servers/init.lua | 2 | ||||
| -rw-r--r-- | lua/nvim-lsp-installer/ui/init.lua | 2 |
5 files changed, 25 insertions, 4 deletions
diff --git a/doc/nvim-lsp-installer.txt b/doc/nvim-lsp-installer.txt index 4af71a46..a769166b 100644 --- a/doc/nvim-lsp-installer.txt +++ b/doc/nvim-lsp-installer.txt @@ -284,6 +284,23 @@ GITHUB MIRROR *nvim-lsp-installer-download-mirror-github* }, } + +============================================================================== +INSTALLATION ERRORS *nvim-lsp-installer-errors* + + *nvim-lsp-installer-errors-github-api* +For some installers, the GitHub API is used to fetch information about +releases. This API imposes a rate limit that may be triggered, causing +installations to fail. The reasons why a rate limit is triggered are many, for +example being behind a public API, or using other software that also send +requests to the GitHub API. + +To circumvent this, nvim-lsp-installer will utilize the GitHub CLI when +available, leading to API requests being subject to a much higher rate limit +threshold when authenticated. Should you run into errors with communicating +with GitHub's API, it's recommended to install, and authenticate, the GitHub +CLI: https://cli.github.com/. + ============================================================================== DEBUGGING *nvim-lsp-installer-debugging* @@ -295,7 +312,9 @@ sure to set nvim-lsp-installer's log level to DEBUG or TRACE, like so: } You may find the logs by entering the command `:LspInstallLog`. Providing the -contents of this file when reporting an issue will help tremendously. +contents of this file when reporting an issue will help tremendously. Remember +to redo whatever is failing after changing the log level in order to capture +new log entries. ============================================================================== Lua module: nvim-lsp-installer diff --git a/lua/nvim-lsp-installer/core/managers/github/init.lua b/lua/nvim-lsp-installer/core/managers/github/init.lua index fe4a4c5a..f74fde76 100644 --- a/lua/nvim-lsp-installer/core/managers/github/init.lua +++ b/lua/nvim-lsp-installer/core/managers/github/init.lua @@ -43,7 +43,7 @@ function M.release_file(opts) local release = _.coalesce(opts.version, ctx.requested_version):or_else_get(function() return client.fetch_latest_release(opts.repo) :map(_.prop "tag_name") - :get_or_throw "Failed to fetch latest release from GitHub API." + :get_or_throw "Failed to fetch latest release from GitHub API. Refer to :h nvim-lsp-installer-errors-github-api for more information." end) ---@type string local asset_file diff --git a/lua/nvim-lsp-installer/core/spawn.lua b/lua/nvim-lsp-installer/core/spawn.lua index 17e2563f..13e05a5b 100644 --- a/lua/nvim-lsp-installer/core/spawn.lua +++ b/lua/nvim-lsp-installer/core/spawn.lua @@ -3,6 +3,7 @@ local Result = require "nvim-lsp-installer.core.result" local process = require "nvim-lsp-installer.core.process" local platform = require "nvim-lsp-installer.core.platform" local functional = require "nvim-lsp-installer.core.functional" +local log = require "nvim-lsp-installer.log" ---@alias JobSpawn table<string, async fun(opts: JobSpawnOpts): Result> ---@type JobSpawn @@ -88,6 +89,7 @@ setmetatable(spawn, { local cmd = self._aliases[normalized_cmd] or normalized_cmd if (env and env.PATH) == nil and args.check_executable ~= false and not is_executable(cmd) then + log.fmt_debug("%s is not executable", cmd) return Failure({ stderr = ("%s is not executable"):format(cmd), }, cmd) diff --git a/lua/nvim-lsp-installer/jobs/outdated-servers/init.lua b/lua/nvim-lsp-installer/jobs/outdated-servers/init.lua index 6e1befa0..065fabfb 100644 --- a/lua/nvim-lsp-installer/jobs/outdated-servers/init.lua +++ b/lua/nvim-lsp-installer/jobs/outdated-servers/init.lua @@ -77,7 +77,7 @@ function M.identify_outdated_servers(servers, on_result) end, receipt, server.root_dir) else complete(VersionCheckResult.empty(server)) - log.fmt_error("Unable to find checker for source=%s", receipt.primary_source.type) + log.fmt_debug("Unable to find checker for source=%s", receipt.primary_source.type) end else complete(VersionCheckResult.empty(server)) diff --git a/lua/nvim-lsp-installer/ui/init.lua b/lua/nvim-lsp-installer/ui/init.lua index fc063ff2..33816b11 100644 --- a/lua/nvim-lsp-installer/ui/init.lua +++ b/lua/nvim-lsp-installer/ui/init.lua @@ -732,7 +732,7 @@ local function init(all_servers) state.servers[server.name].installer.is_running = true end) - log.fmt_info("Starting install server_name=%s, requested_version=%s", server.name, requested_version or "") + log.fmt_debug("Starting install server_name=%s, requested_version=%s", server.name, requested_version or "") server:install_attached({ requested_server_version = requested_version, |
