From cec20701aec24b6a34cb0d55e8f85068de273781 Mon Sep 17 00:00:00 2001 From: Ali Almohaya Date: Mon, 10 Oct 2022 01:16:44 +0300 Subject: [PATCH] chore: run fmt, and lint --- lua/openingh/init.lua | 4 ++-- lua/openingh/utils.lua | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lua/openingh/init.lua b/lua/openingh/init.lua index 3bcbccd..60f7457 100644 --- a/lua/openingh/init.lua +++ b/lua/openingh/init.lua @@ -3,8 +3,8 @@ local M = {} function M.setup() -- get the current working directory and set the url - local current_buffer = vim.fn.expand('%:p:h') - local repo_url = vim.fn.system("git -C " ..current_buffer.. " config --get remote.origin.url" ) + local current_buffer = vim.fn.expand("%:p:h") + local repo_url = vim.fn.system("git -C " .. current_buffer .. " config --get remote.origin.url") if repo_url:len() == 0 then M.is_no_git_origin = true diff --git a/lua/openingh/utils.lua b/lua/openingh/utils.lua index 90f2a0d..0907206 100644 --- a/lua/openingh/utils.lua +++ b/lua/openingh/utils.lua @@ -29,7 +29,9 @@ function M.parse_gh_remote(url) local ssh = { string.find(url, ".*git@(.*)[:/]([^/]*)/([^%s/]*)") } local matches = http[1] == nil and ssh or http - if matches[1] == nil then return nil end + if matches[1] == nil then + return nil + end local _, _, host, user_or_org, reponame = unpack(matches) return { host = host, user_or_org = user_or_org, reponame = string.gsub(reponame, ".git", "") }