refactor(struct_tags): move requires into function
This commit is contained in:
parent
8b751a2fbf
commit
64c90c9f6b
1 changed files with 5 additions and 4 deletions
|
|
@ -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 M = {}
|
||||||
|
|
||||||
local function modify(...)
|
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 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)))
|
local ns = ts_utils.get_struct_node_at_pos(unpack(vim.api.nvim_win_get_cursor(0)))
|
||||||
if ns == nil then
|
if ns == nil then
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue