diff options
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/nvim-lsp-installer.lua | 17 | ||||
| -rw-r--r-- | lua/nvim-lsp-installer/installers/context.lua | 2 | ||||
| -rw-r--r-- | lua/nvim-lsp-installer/ui/status-win/init.lua | 9 |
3 files changed, 25 insertions, 3 deletions
diff --git a/lua/nvim-lsp-installer.lua b/lua/nvim-lsp-installer.lua index 5253e654..d1ab5f20 100644 --- a/lua/nvim-lsp-installer.lua +++ b/lua/nvim-lsp-installer.lua @@ -12,8 +12,23 @@ local M = {} M.settings = settings.set ---- Opens the status window. +M.info_window = { + ---Opens the status window. + open = function() + status_win().open() + end, + ---Closes the status window. + close = function() + status_win().close() + end, +} + +---Deprecated. Use info_window.open(). function M.display() + notify( + "The lsp_installer.display() function has been deprecated. Use lsp_installer.info_window.open() instead.", + vim.log.levels.WARN + ) status_win().open() end diff --git a/lua/nvim-lsp-installer/installers/context.lua b/lua/nvim-lsp-installer/installers/context.lua index b5be573f..71f2f991 100644 --- a/lua/nvim-lsp-installer/installers/context.lua +++ b/lua/nvim-lsp-installer/installers/context.lua @@ -89,7 +89,7 @@ function M.use_github_release(repo) end ---@param repo string @The GitHub report ("username/repo"). ----@param file string @The name of a file availabine in the provided repo's GitHub releases. +---@param file string|fun(resolved_version: string): string @The name of a file available in the provided repo's GitHub releases. function M.use_github_release_file(repo, file) return installers.pipe { M.use_github_release(repo), diff --git a/lua/nvim-lsp-installer/ui/status-win/init.lua b/lua/nvim-lsp-installer/ui/status-win/init.lua index 887f6df1..d08536b6 100644 --- a/lua/nvim-lsp-installer/ui/status-win/init.lua +++ b/lua/nvim-lsp-installer/ui/status-win/init.lua @@ -729,6 +729,12 @@ local function init(all_servers) start_delay_ms = 1000, } + local function close() + if window then + window.close() |
