From 8db6fc5268fdbb455a55d66c7d12443527371570 Mon Sep 17 00:00:00 2001 From: Michael Bleuez Date: Tue, 6 Sep 2022 20:15:14 +0200 Subject: [PATCH] mark snipterminate for deprecation --- doc/sniprun.txt | 2 -- lua/sniprun.lua | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/doc/sniprun.txt b/doc/sniprun.txt index 472fcd66..07270537 100644 --- a/doc/sniprun.txt +++ b/doc/sniprun.txt @@ -40,8 +40,6 @@ ALL COMMANDS *sniprun-commands* :SnipReplMemoryClean If you sent incorrect code to a interpreter with enabled REPL mode, you can clear the REPL 'memory' with that. It will forget all variables you have defined previously etc.. -:SnipTerminate Kill Sniprun and child processes (equivalent to SnipReset but does not clean the cache) - :SnipInfo Get Sniprun version info and info about the available interpreters :SnipClose Clear virtual text and close splits and floating windows created by sniprun diff --git a/lua/sniprun.lua b/lua/sniprun.lua index 6872cd3a..93e1147b 100644 --- a/lua/sniprun.lua +++ b/lua/sniprun.lua @@ -171,13 +171,13 @@ function M.configure_keymaps() vim.api.nvim_set_keymap("v", "SnipRun", ":lua require'sniprun'.run('v')", {silent=true}) vim.api.nvim_set_keymap("n", "SnipRun", ":lua require'sniprun'.run()",{silent=true}) vim.api.nvim_set_keymap("n", "SnipRunOperator", ":set opfunc=SnipRunOperatorg@",{silent=true}) - vim.api.nvim_set_keymap("n", "SnipRTerminate", ":lua require'sniprun'.terminate()",{silent=true}) + vim.api.nvim_set_keymap("n", "SnipRTerminate", ":lua require'sniprun'.terminate() ; print('warning: SnipTerminate will be deprecated in the next release. Use SnipReset instead') ",{silent=true}) vim.api.nvim_set_keymap("n", "SnipReset", ":lua require'sniprun'.reset()",{silent=true}) vim.api.nvim_set_keymap("n", "SnipInfo", ":lua require'sniprun'.info()",{}) vim.api.nvim_set_keymap("n", "SnipReplMemoryClean", ":lua require'sniprun'.clear_repl()",{silent=true}) vim.api.nvim_set_keymap("n", "SnipClose", ":lua require'sniprun.display'.close_all()",{silent=true}) - vim.cmd("command! SnipTerminate :lua require'sniprun'.terminate()") + vim.cmd("command! SnipTerminate :lua require'sniprun'.terminate() ; print('warning: SnipTerminate will be deprecated in the next release. Use SnipReset instead') ") vim.cmd("command! SnipReset :lua require'sniprun'.reset()") vim.cmd("command! SnipReplMemoryClean :lua require'sniprun'.clear_repl()") vim.cmd("function! SnipRunOperator(...) \n lua require'sniprun'.run('n') \n endfunction")