mirror of
https://github.com/nvim-lua/kickstart.nvim.git
synced 2025-06-25 06:38:34 +02:00
Done
This commit is contained in:
parent
3338d39206
commit
edc87670eb
16 changed files with 1096 additions and 13 deletions
45
lua/custom/plugins/sniprun.lua
Normal file
45
lua/custom/plugins/sniprun.lua
Normal file
|
@ -0,0 +1,45 @@
|
|||
-- Sniprun plugin configuration
|
||||
-- https://github.com/michaelb/sniprun
|
||||
|
||||
return {
|
||||
"michaelb/sniprun",
|
||||
branch = "master",
|
||||
build = "sh install.sh",
|
||||
-- Lazy load on keys
|
||||
config = function()
|
||||
require("sniprun").setup({
|
||||
-- Display the output more efficiently
|
||||
display = {
|
||||
"Classic", -- Display stdout in the command line
|
||||
"VirtualTextOk", -- Display successful results as virtual text
|
||||
"FloatingWindow" -- Display results in a floating window
|
||||
},
|
||||
-- Optimize display options
|
||||
display_options = {
|
||||
terminal_width = 45,
|
||||
notification_duration = 5 -- in seconds
|
||||
},
|
||||
-- Configure specific languages (focus on the most commonly used)
|
||||
repl_enable = {
|
||||
"Python3_original",
|
||||
"JS_TS_deno",
|
||||
"Lua_nvim"
|
||||
},
|
||||
-- Python interpreter configuration with optimized path
|
||||
interpreter_options = {
|
||||
Python3_original = {
|
||||
command = "/home/kali/.local/share/pipx/venvs/klepto/bin/python",
|
||||
}
|
||||
},
|
||||
})
|
||||
end,
|
||||
-- Define keymaps directly in the keys table
|
||||
keys = {
|
||||
{ "<leader>Sr", "<Plug>SnipRun", mode = "n", desc = "Run code snippet" },
|
||||
{ "<leader>Sr", "<Plug>SnipRun", mode = "v", desc = "Run selected code" },
|
||||
{ "<leader>Sc", "<Plug>SnipClose", desc = "Close sniprun output" },
|
||||
{ "<leader>SR", "<Plug>SnipReset", desc = "Reset sniprun" },
|
||||
{ "<leader>Si", "<Plug>SnipInfo", desc = "Sniprun info" },
|
||||
{ "<F5>", "<Plug>SnipRunOperator", desc = "Sniprun operator mode" },
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue