fix: resolve luacheck warnings - Terminal scope and unused function
Some checks failed
Luacheck / luacheck (push) Successful in 11s
StyLua / stylua (push) Failing after 2s

This commit is contained in:
Jeremie Fraeys 2026-02-08 15:15:17 -05:00
parent 0b992ef288
commit d79c9ce5dc
No known key found for this signature in database
2 changed files with 13 additions and 14 deletions

View file

@ -16,16 +16,12 @@ if ok_conform then
})
end
if not vim.g.julia_repl_setup_done then
local ok_toggleterm, toggleterm_terminal = pcall(require, 'toggleterm.terminal')
local Terminal = ok_toggleterm and toggleterm_terminal.Terminal or nil
if not vim.g.julia_repl_setup_done and Terminal then
vim.g.julia_repl_setup_done = true
local ok_toggleterm, toggleterm_terminal = pcall(require, 'toggleterm.terminal')
if not ok_toggleterm then
return
end
local Terminal = toggleterm_terminal.Terminal
local function get_startup_commands()
return [[
ENV["JULIA_NOVERSIONS"] = "yes"
@ -83,19 +79,19 @@ println("\033[2J\033[H")
end
local function send_to_julia(code)
local julia = vim.__julia_repl_terminal
if not julia then
local julia_terminal = vim.__julia_repl_terminal
if not julia_terminal then
return
end
if not julia:is_open() then
julia:open()
if not julia_terminal:is_open() then
julia_terminal:open()
vim.defer_fn(function()
julia:send(code)
julia_terminal:send(code)
vim.cmd('wincmd p')
end, 200)
else
julia:send(code)
julia_terminal:send(code)
vim.cmd('wincmd p')
end
end

View file

@ -45,6 +45,9 @@ local function get_ipython_cmd()
return py .. ' -m IPython'
end
-- luacheck: ignore
local _unused_get_ipython_cmd = get_ipython_cmd
local function get_ipython_argv()
local cwd = vim.fn.getcwd()
local venv = vim.env.VIRTUAL_ENV