Compare commits
2 commits
ded926a4a6
...
386e972834
| Author | SHA1 | Date | |
|---|---|---|---|
| 386e972834 | |||
| 8a7d510cda |
4 changed files with 21 additions and 5 deletions
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
|
@ -31,7 +31,7 @@ jobs:
|
||||||
- name: Run stylua
|
- name: Run stylua
|
||||||
uses: JohnnyMorganz/stylua-action@v4.0.0
|
uses: JohnnyMorganz/stylua-action@v4.0.0
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN || secrets.GH_TOKEN }}
|
||||||
version: latest
|
version: latest
|
||||||
args: --check .
|
args: --check .
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@ local prompt = require "ivy.prompt"
|
||||||
local utils = require "ivy.utils"
|
local utils = require "ivy.utils"
|
||||||
|
|
||||||
local controller = {}
|
local controller = {}
|
||||||
controller.action = utils.actions
|
|
||||||
|
|
||||||
controller.items = nil
|
controller.items = nil
|
||||||
controller.callback = nil
|
controller.callback = nil
|
||||||
|
|
@ -56,7 +55,7 @@ end
|
||||||
|
|
||||||
controller.checkpoint = function()
|
controller.checkpoint = function()
|
||||||
vim.api.nvim_set_current_win(window.origin)
|
vim.api.nvim_set_current_win(window.origin)
|
||||||
controller.callback(window.get_current_selection(), controller.action.CHECKPOINT)
|
controller.callback(window.get_current_selection(), utils.actions.CHECKPOINT)
|
||||||
vim.api.nvim_set_current_win(window.window)
|
vim.api.nvim_set_current_win(window.window)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,28 @@
|
||||||
local controller = require "ivy.controller"
|
local controller = require "ivy.controller"
|
||||||
|
local libivy = require "ivy.libivy"
|
||||||
local config = require "ivy.config"
|
local config = require "ivy.config"
|
||||||
|
local utils = require "ivy.utils"
|
||||||
local register_backend = require "ivy.register_backend"
|
local register_backend = require "ivy.register_backend"
|
||||||
|
|
||||||
local ivy = {}
|
local ivy = {}
|
||||||
|
|
||||||
|
ivy.action = utils.actions
|
||||||
|
ivy.utils = utils
|
||||||
|
|
||||||
|
ivy.match = libivy.ivy_match
|
||||||
|
|
||||||
ivy.run = controller.run
|
ivy.run = controller.run
|
||||||
ivy.register_backend = register_backend
|
ivy.register_backend = register_backend
|
||||||
|
|
||||||
|
ivy.checkpoint = controller.checkpoint
|
||||||
|
ivy.paste = controller.paste
|
||||||
|
ivy.complete = controller.complete
|
||||||
|
ivy.destroy = controller.destroy
|
||||||
|
ivy.input = controller.input
|
||||||
|
ivy.next = controller.next
|
||||||
|
ivy.previous = controller.previous
|
||||||
|
ivy.search = controller.search
|
||||||
|
|
||||||
-- Private variable to check if ivy has been setup, this is to prevent multiple
|
-- Private variable to check if ivy has been setup, this is to prevent multiple
|
||||||
-- setups of ivy. This is only exposed for testing purposes.
|
-- setups of ivy. This is only exposed for testing purposes.
|
||||||
---@private
|
---@private
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
local controller = require "ivy.controller"
|
local api = require "ivy"
|
||||||
|
|
||||||
-- Put the controller in to the vim global so we can access it in mappings
|
-- 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`.
|
-- better without requires. You can call controller commands like `vim.ivy.xxx`.
|
||||||
-- luacheck: ignore
|
-- luacheck: ignore
|
||||||
vim.ivy = controller
|
vim.ivy = api
|
||||||
|
|
||||||
vim.paste = (function(overridden)
|
vim.paste = (function(overridden)
|
||||||
return function(lines, phase)
|
return function(lines, phase)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue