From 4613529ab1f39ddd611b22d31bb88cfdfe851ce5 Mon Sep 17 00:00:00 2001 From: William Boman Date: Mon, 23 May 2022 18:03:13 +0200 Subject: feat: add setting to disable automatic version check when opening UI window (#716) --- lua/nvim-lsp-installer/settings.lua | 2 ++ lua/nvim-lsp-installer/ui/init.lua | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'lua') diff --git a/lua/nvim-lsp-installer/settings.lua b/lua/nvim-lsp-installer/settings.lua index dd4a3d18..a0641480 100644 --- a/lua/nvim-lsp-installer/settings.lua +++ b/lua/nvim-lsp-installer/settings.lua @@ -18,6 +18,8 @@ local DEFAULT_SETTINGS = { automatic_installation = false, ui = { + -- Whether to automatically check for outdated servers when opening the UI window. + check_outdated_servers_on_open = true, icons = { -- The list icon to use for installed servers. diff --git a/lua/nvim-lsp-installer/ui/init.lua b/lua/nvim-lsp-installer/ui/init.lua index d3c9a574..9086f6cd 100644 --- a/lua/nvim-lsp-installer/ui/init.lua +++ b/lua/nvim-lsp-installer/ui/init.lua @@ -960,7 +960,7 @@ local function init(all_servers) state.prioritized_servers = _.set_of(prioritized_servers) end) - if not has_opened then + if not has_opened and settings.current.ui.check_outdated_servers_on_open then -- Only do this automatically once - when opening the window the first time vim.defer_fn(function() identify_outdated_servers(lsp_servers.get_installed_servers()) -- cgit v1.3