mirror of
https://github.com/Iron-E/nvim-libmodal
synced 2024-11-16 12:13:32 +00:00
17 lines
385 B
Lua
17 lines
385 B
Lua
local libmodal = require('libmodal')
|
||
|
||
function fooMode()
|
||
local userInput = string.char(
|
||
vim.api.nvim_get_var('fooModeInput')
|
||
)
|
||
|
||
if userInput == '' then
|
||
vim.api.nvim_command("echom 'You cant leave using <Esc>.'")
|
||
elseif userInput == 'q' then
|
||
vim.api.nvim_set_var('fooModeExit', true)
|
||
end
|
||
end
|
||
|
||
vim.api.nvim_set_var('fooModeExit', 0)
|
||
libmodal.mode.enter('FOO', fooMode, true)
|