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,15 +16,11 @@ if ok_conform then
|
|||
})
|
||||
end
|
||||
|
||||
if not vim.g.julia_repl_setup_done 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 = ok_toggleterm and toggleterm_terminal.Terminal or nil
|
||||
|
||||
local Terminal = toggleterm_terminal.Terminal
|
||||
if not vim.g.julia_repl_setup_done and Terminal then
|
||||
vim.g.julia_repl_setup_done = true
|
||||
|
||||
local function get_startup_commands()
|
||||
return [[
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue