aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authorWilliam Boman <william@redwill.se>2022-05-23 18:03:13 +0200
committerGitHub <noreply@github.com>2022-05-23 18:03:13 +0200
commit4613529ab1f39ddd611b22d31bb88cfdfe851ce5 (patch)
treeb5a571d1355e63493f2dbd56d11d7cd05134e8dd /lua
parentui: remove borders & change heading style (#713) (diff)
downloadmason-4613529ab1f39ddd611b22d31bb88cfdfe851ce5.tar
mason-4613529ab1f39ddd611b22d31bb88cfdfe851ce5.tar.gz
mason-4613529ab1f39ddd611b22d31bb88cfdfe851ce5.tar.bz2
mason-4613529ab1f39ddd611b22d31bb88cfdfe851ce5.tar.lz
mason-4613529ab1f39ddd611b22d31bb88cfdfe851ce5.tar.xz
mason-4613529ab1f39ddd611b22d31bb88cfdfe851ce5.tar.zst
mason-4613529ab1f39ddd611b22d31bb88cfdfe851ce5.zip
feat: add setting to disable automatic version check when opening UI window (#716)
Diffstat (limited to 'lua')
-rw-r--r--lua/nvim-lsp-installer/settings.lua2
-rw-r--r--lua/nvim-lsp-installer/ui/init.lua2
2 files changed, 3 insertions, 1 deletions
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())