From 64c90c9f6bb15d8a115e57a9dd93942ff6e46ab0 Mon Sep 17 00:00:00 2001 From: Smirnov Oleksandr Date: Sun, 13 Nov 2022 14:18:43 +0200 Subject: [PATCH] refactor(struct_tags): move requires into function --- lua/gopher/struct_tags.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lua/gopher/struct_tags.lua b/lua/gopher/struct_tags.lua index 11488b0..a91901a 100644 --- a/lua/gopher/struct_tags.lua +++ b/lua/gopher/struct_tags.lua @@ -1,10 +1,11 @@ -local Job = require "plenary.job" -local ts_utils = require "gopher._utils.ts" -local u = require "gopher._utils" -local c = require("gopher.config").config.commands local M = {} local function modify(...) + local ts_utils = require "gopher._utils.ts" + local Job = require "plenary.job" + local c = require("gopher.config").config.commands + local u = require "gopher._utils" + local fpath = vim.fn.expand "%" ---@diagnostic disable-line: missing-parameter local ns = ts_utils.get_struct_node_at_pos(unpack(vim.api.nvim_win_get_cursor(0))) if ns == nil then