From 1f7e952a75a870b0a4e9900964cae3729c216cc3 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sun, 23 Jun 2024 15:23:48 +0200 Subject: checkpoint --- config/essentials/vis/vis-go.lua | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'config/essentials/vis/vis-go.lua') diff --git a/config/essentials/vis/vis-go.lua b/config/essentials/vis/vis-go.lua index b0b383f..647e003 100644 --- a/config/essentials/vis/vis-go.lua +++ b/config/essentials/vis/vis-go.lua @@ -1,3 +1,12 @@ +--[[ +Based on https://gitlab.com/timoha/vis-go +Changes made: +- stylua format +- check if line, col in godef() +- no formatting because already handled by format.lua +- removed the goimports option +--]] + local function jump_to(path, line, col) if path then vis:command(string.format("e %s", path)) @@ -44,7 +53,9 @@ local function godef() -- same file line, col = string.match(out, "([^:]+):([^:]+)") end - jump_to(path, line, col) + if line and col then + jump_to(path, line, col) + end end local function godef_back() -- cgit v1.2.3