From 9dcaecb62db8cba2fe8131f27499c71903201303 Mon Sep 17 00:00:00 2001 From: Samuel Onoja Date: Wed, 16 Oct 2024 19:56:05 +0100 Subject: [PATCH] fix nits --- lua/rustaceanvim/lsp/init.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lua/rustaceanvim/lsp/init.lua b/lua/rustaceanvim/lsp/init.lua index a5049771..aed604ac 100644 --- a/lua/rustaceanvim/lsp/init.lua +++ b/lua/rustaceanvim/lsp/init.lua @@ -96,9 +96,9 @@ end ---LSP restart ininer implementations ---@param bufnr? number ----@param set_target_callback? function(client) Optional callback to run for each client before restarting. +---@param callback? function(client) Optional callback to run for each client before restarting. ---@return number|nil client_id -local function restart(bufnr, set_target_callback) +local function restart(bufnr, callback) bufnr = bufnr or vim.api.nvim_get_current_buf() local clients = M.stop(bufnr) local timer, _, _ = vim.uv.new_timer() @@ -114,8 +114,8 @@ local function restart(bufnr, set_target_callback) stopped_client_count = stopped_client_count + 1 vim.schedule(function() -- Execute the callback, if provided, for additional actions before restarting - if set_target_callback then - set_target_callback(client) + if callback then + callback(client) end M.start(bufnr) end)