Skip to content

Commit

Permalink
Merge pull request #246 from antonk52/patch-2
Browse files Browse the repository at this point in the history
feat: lazy load spectre core for the command
  • Loading branch information
EpsilonKu authored Jul 30, 2024
2 parents 3b49d1e + c6c7a6c commit 1f7562e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions plugin/spectre.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
local spectre = require("spectre")

local function get_arg(str)
local key, value = str:match([=[^([^%s]*)=([^%s]*)$]=])

Expand All @@ -11,6 +9,7 @@ local function get_arg(str)
end

vim.api.nvim_create_user_command("Spectre", function(ctx)
local spectre = require("spectre")
local args = {}
local user_args
if #ctx.fargs == 1 or vim.tbl_isempty(ctx.fargs) then
Expand Down

0 comments on commit 1f7562e

Please sign in to comment.