nvim + pi / bi-directional communication
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041local M = {}
local terminal = require('pi-nvim.cli.terminal')
local enabled = falselocal timer = nil
function M.enable() if enabled then return end enabled = true
timer = vim.uv.new_timer() timer:start( 2000, 2000, vim.schedule_wrap(function() local term = terminal.get_current() if term and terminal.is_open(term) then vim.cmd('checktime') end end) )end
function M.disable() if not enabled then return end enabled = false
if timer then timer:stop() timer:close() timer = nil endend
return M