2022-07-10 20:07:33 +00:00
|
|
|
local controller = require "ivy.controller"
|
|
|
|
|
|
|
|
|
|
-- Put the controller in to the vim global so we can access it in mappings
|
|
|
|
|
-- better without requires. You can call controller commands like `vim.ivy.xxx`.
|
2022-08-06 14:02:42 +00:00
|
|
|
-- luacheck: ignore
|
2022-07-10 20:07:33 +00:00
|
|
|
vim.ivy = controller
|
|
|
|
|
|
2023-06-02 16:05:57 +00:00
|
|
|
vim.paste = (function(overridden)
|
|
|
|
|
return function(lines, phase)
|
|
|
|
|
local file_type = vim.api.nvim_buf_get_option(0, "filetype")
|
|
|
|
|
if file_type == "ivy" then
|
|
|
|
|
vim.ivy.paste()
|
|
|
|
|
else
|
|
|
|
|
overridden(lines, phase)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end)(vim.paste)
|
|
|
|
|
|
2022-09-02 20:28:06 +00:00
|
|
|
vim.cmd "highlight IvyMatch cterm=bold gui=bold"
|