From 3f7a06237646a2db994a4a96da1a770b339522b0 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 14 Sep 2023 11:13:27 +0000 Subject: [PATCH] home: vim: lua: util: fix comments --- home/vim/lua/ambroisie/utils.lua | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/home/vim/lua/ambroisie/utils.lua b/home/vim/lua/ambroisie/utils.lua index 984c730..418e0d1 100644 --- a/home/vim/lua/ambroisie/utils.lua +++ b/home/vim/lua/ambroisie/utils.lua @@ -1,29 +1,29 @@ local M = {} --- pretty print lua object --- @param obj any object to pretty print +--- pretty print lua object +--- @param obj any object to pretty print M.dump = function(obj) print(vim.inspect(obj)) end --- checks if a given command is executable ----@param cmd string? command to check ----@return boolean executable +--- @param cmd string? command to check +--- @return boolean executable M.is_executable = function(cmd) return cmd and vim.fn.executable(cmd) == 1 end --- return a function that checks if a given command is executable ----@param cmd string? command to check ----@return fun(cmd: string): boolean executable +--- @param cmd string? command to check +--- @return fun(cmd: string): boolean executable M.is_executable_condition = function(cmd) return function() return M.is_executable(cmd) end end --- whether or not we are currently in an SSH connection --- @return boolean ssh connection +--- whether or not we are currently in an SSH connection +--- @return boolean ssh connection M.is_ssh = function() local variables = { "SSH_CONNECTION", @@ -40,9 +40,9 @@ M.is_ssh = function() return false end --- list all active LSP clients for current buffer --- @param bufnr int? buffer number --- @return table all active LSP client names +--- list all active LSP clients for current buffer +--- @param bufnr int? buffer number +--- @return table all active LSP client names M.list_lsp_clients = function(bufnr) local clients = vim.lsp.buf_get_clients(bufnr) local names = {}