fix: resolve luacheck warnings - Terminal scope and unused function
This commit is contained in:
parent
0b992ef288
commit
d79c9ce5dc
2 changed files with 13 additions and 14 deletions
|
|
@ -16,16 +16,12 @@ if ok_conform then
|
||||||
})
|
})
|
||||||
end
|
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
|
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()
|
local function get_startup_commands()
|
||||||
return [[
|
return [[
|
||||||
ENV["JULIA_NOVERSIONS"] = "yes"
|
ENV["JULIA_NOVERSIONS"] = "yes"
|
||||||
|
|
@ -83,19 +79,19 @@ println("\033[2J\033[H")
|
||||||
end
|
end
|
||||||
|
|
||||||
local function send_to_julia(code)
|
local function send_to_julia(code)
|
||||||
local julia = vim.__julia_repl_terminal
|
local julia_terminal = vim.__julia_repl_terminal
|
||||||
if not julia then
|
if not julia_terminal then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if not julia:is_open() then
|
if not julia_terminal:is_open() then
|
||||||
julia:open()
|
julia_terminal:open()
|
||||||
vim.defer_fn(function()
|
vim.defer_fn(function()
|
||||||
julia:send(code)
|
julia_terminal:send(code)
|
||||||
vim.cmd('wincmd p')
|
vim.cmd('wincmd p')
|
||||||
end, 200)
|
end, 200)
|
||||||
else
|
else
|
||||||
julia:send(code)
|
julia_terminal:send(code)
|
||||||
vim.cmd('wincmd p')
|
vim.cmd('wincmd p')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,9 @@ local function get_ipython_cmd()
|
||||||
return py .. ' -m IPython'
|
return py .. ' -m IPython'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- luacheck: ignore
|
||||||
|
local _unused_get_ipython_cmd = get_ipython_cmd
|
||||||
|
|
||||||
local function get_ipython_argv()
|
local function get_ipython_argv()
|
||||||
local cwd = vim.fn.getcwd()
|
local cwd = vim.fn.getcwd()
|
||||||
local venv = vim.env.VIRTUAL_ENV
|
local venv = vim.env.VIRTUAL_ENV
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue