Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion lua/haskell-tools/repl/builtin.lua
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,19 @@ local function buf_create_repl(bufnr, cmd, opts)
opts.on_stderr = repl_log(log.warn)
opts.on_stdin = repl_log(log.debug)
end
opts.term = true
log.debug { 'repl.builtin: Opening terminal', cmd, opts }

-- TODO(0.11): Replace with vim.fn.jobstart(full_command, { term = true })
-- run the command
---@diagnostic disable-next-line: deprecated
if type(vim.fn.termopen) == 'function' then
---@diagnostic disable-next-line: deprecated
vim.fn.termopen(cmd, opts)
else
opts.term = true
vim.fn.jobstart(cmd, opts)
end

local job_id = vim.fn.jobstart(cmd, opts)
if not job_id then
log.error('repl.builtin: Failed to open a terminal')
Expand Down