summaryrefslogtreecommitdiff
path: root/fnl
diff options
context:
space:
mode:
Diffstat (limited to 'fnl')
-rw-r--r--fnl/conf/init.fnl14
1 files changed, 14 insertions, 0 deletions
diff --git a/fnl/conf/init.fnl b/fnl/conf/init.fnl
index 881cbbe..1bcb1a7 100644
--- a/fnl/conf/init.fnl
+++ b/fnl/conf/init.fnl
@@ -31,6 +31,7 @@
(map :n :<c-p> ":Telescope find_files<cr>")
(map :n "`<Backspace>" ":FocusDispatch ")
(map :n "`k" ":K9s ")
+ (map :n "`s" ":Ssh ")
(map :n :<leader>p ":NewTab<cr>")
(map :n :<leader>cf ":tabedit ~/flake|tc ~/flake|G<cr><c-w>o")
(map :n :<leader>cn ":tabedit ~/neovim|tc ~/neovim|G<cr><c-w>o"))
@@ -118,3 +119,16 @@
(vim.cmd (.. ":Start k9s --context "
(. ctx.fargs 1))))
{:nargs 1})
+
+(vim.api.nvim_create_user_command :Ssh
+ (fn [ctx]
+ (vim.cmd (.. ":Start ssh " (. ctx.fargs 1))))
+ {:nargs 1
+ :complete (fn [lead cmdline cursor]
+ (local p
+ (io.popen :get-sshables))
+ (local lines
+ (icollect [line (p:lines)]
+ line))
+ (p:close)
+ lines)})