refactor(iferr): move requires inside of a function
This commit is contained in:
parent
12d0885c0d
commit
625875c860
1 changed files with 3 additions and 3 deletions
|
|
@ -1,10 +1,10 @@
|
|||
local c = require("gopher.config").config.commands
|
||||
local u = require "gopher._utils"
|
||||
|
||||
---Add iferr declaration
|
||||
---That's Lua of vimscript implementation of:
|
||||
---github.com/koron/iferr
|
||||
return function()
|
||||
local c = require("gopher.config").config.commands
|
||||
local u = require "gopher._utils"
|
||||
|
||||
local boff = vim.fn.wordcount().cursor_bytes
|
||||
local cmd = (c.iferr .. " -pos " .. boff)
|
||||
local data = vim.fn.systemlist(cmd, vim.fn.bufnr "%")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue