Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F31224
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
816 B
Referenced Files
None
Subscribers
None
View Options
diff --git a/scripts/integration.lua b/scripts/integration.lua
new file mode 100644
index 0000000..f155f7d
--- /dev/null
+++ b/scripts/integration.lua
@@ -0,0 +1,30 @@
+vim.opt.rtp:append(vim.fn.getcwd())
+
+local ivy = require "ivy"
+local prompt = require "ivy.prompt"
+require "plugin.ivy"
+
+if #vim.v.argv ~= 5 then
+ print "[ERROR] Expected 5 arguments"
+ print " Usage: nvim -l ./scripts/integration.lua <directory> <search>"
+
+ return
+end
+
+ivy.setup()
+
+vim.fn.chdir(vim.v.argv[4])
+print("Working in " .. vim.fn.getcwd())
+
+vim.cmd "IvyFd"
+
+for _, value in pairs(vim.split(vim.v.argv[5], "")) do
+ local start_time = os.clock()
+
+ vim.ivy.input(value)
+ vim.wait(0)
+
+ local running_time = os.clock() - start_time
+
+ io.stdout:write(prompt.text() .. "\t" .. running_time .. "\n")
+end
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Fri, Sep 12, 11:22 PM (1 d, 13 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5531
Default Alt Text
(816 B)
Attached To
Mode
R1 ivy.nvim
Attached
Detach File
Event Timeline
Log In to Comment