Skip to content

Commit

Permalink
set up remote dev
Browse files Browse the repository at this point in the history
  • Loading branch information
kwigley committed Jun 12, 2024
1 parent dd45a00 commit 093229b
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 3 deletions.
5 changes: 3 additions & 2 deletions lazy-lock.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"CopilotChat.nvim": { "branch": "canary", "commit": "82923efe22b604cf9c0cad0bb2a74aa9247755ab" },
"LazyVim": { "branch": "main", "commit": "26e3e39f2eb1251841f5574f29c7eecb55fef816" },
"LazyVim": { "branch": "main", "commit": "128c3fcfe6aded09bc319bf1ed89fa5e99dca75c" },
"SchemaStore.nvim": { "branch": "main", "commit": "493250022db69edd8afe8e6d0f17105756a3b721" },
"barbecue.nvim": { "branch": "main", "commit": "d38a2a023dfb1073dd0e8fee0c9be08855d3688f" },
"bufferline.nvim": { "branch": "main", "commit": "99337f63f0a3c3ab9519f3d1da7618ca4f91cffe" },
Expand Down Expand Up @@ -63,13 +63,14 @@
"nvim-terminal.lua": { "branch": "master", "commit": "095f98aaa7265628a72cd2706350c091544b5602" },
"nvim-treesitter": { "branch": "master", "commit": "9a7ad2ff7a7ea81016aca2fc89c9b2c1a5365421" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "34867c69838078df7d6919b130c0541c0b400c47" },
"nvim-ts-autotag": { "branch": "main", "commit": "2692808eca8a4ac3311516a1c4a14bb97ecc6482" },
"nvim-ts-autotag": { "branch": "main", "commit": "06fe07d7523ba8c755fac7c913fceba43b1720ee" },
"nvim-web-devicons": { "branch": "master", "commit": "c0cfc1738361b5da1cd0a962dd6f774cc444f856" },
"octo.nvim": { "branch": "master", "commit": "22f34582a4eb1fb221eafd0daa9eb1b2bacfb813" },
"oxocarbon.nvim": { "branch": "main", "commit": "c5846d10cbe4131cc5e32c6d00beaf59cb60f6a2" },
"persistence.nvim": { "branch": "main", "commit": "5fe077056c821aab41f87650bd6e1c48cd7dd047" },
"plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" },
"refactoring.nvim": { "branch": "master", "commit": "d2786877c91aa409c824f27b4ce8a9f560dda60a" },
"remote-nvim.nvim": { "branch": "main", "commit": "a097a826742958d8c28ccf651e569add5a904259" },
"rustaceanvim": { "branch": "master", "commit": "2fa45427c01ded4d3ecca72e357f8a60fd8e46d4" },
"styler.nvim": { "branch": "main", "commit": "2cd29996d08cec8b31270c6de64465f716ef9d71" },
"tailwindcss-colorizer-cmp.nvim": { "branch": "main", "commit": "3d3cd95e4a4135c250faf83dd5ed61b8e5502b86" },
Expand Down
1 change: 0 additions & 1 deletion lazyvim.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"lazyvim.plugins.extras.lang.helm",
"lazyvim.plugins.extras.lang.json",
"lazyvim.plugins.extras.lang.markdown",
"lazyvim.plugins.extras.lang.nix",
"lazyvim.plugins.extras.lang.python",
"lazyvim.plugins.extras.lang.rust",
"lazyvim.plugins.extras.lang.sql",
Expand Down
36 changes: 36 additions & 0 deletions lua/plugins/editor.lua
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,40 @@ return {
keys = { { "J", "<cmd>TSJToggle<cr>", desc = "Join Toggle" } },
opts = { use_default_keymaps = false, max_join_length = 150 },
},
{
"amitds1997/remote-nvim.nvim",
version = "*", -- Pin to GitHub releases
dependencies = {
"nvim-lua/plenary.nvim", -- For standard functions
"MunifTanjim/nui.nvim", -- To build the plugin UI
"nvim-telescope/telescope.nvim", -- For picking b/w different remote methods
},
config = function()
require("remote-nvim").setup({
client_callback = function(port, workspace_config)
local cmd = ("wezterm cli set-tab-title --pane-id $(wezterm cli spawn nvim --server localhost:%s --remote-ui) %s"):format(
port,
("'Remote: %s'"):format(workspace_config.host)
)
if vim.env.TERM == "xterm-kitty" then
cmd = ("kitty -e nvim --server localhost:%s --remote-ui"):format(port)
end
vim.fn.jobstart(cmd, {
detach = true,
on_exit = function(job_id, exit_code, event_type)
-- This function will be called when the job exits
print(
"Client",
job_id,
"exited with code",
exit_code,
"Event type:",
event_type
)
end,
})
end,
})
end,
},
}

0 comments on commit 093229b

Please sign in to comment.