Skip to content

Commit 4a42655

Browse files
committed
Configure remote-nvim
1 parent 53fcf70 commit 4a42655

File tree

2 files changed

+48
-12
lines changed

2 files changed

+48
-12
lines changed

lua/custom/plugins/nvim-lspconfig.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ return { -- LSP Configuration & Plugins
150150
-- https://github.com/pmizio/typescript-tools.nvim
151151
--
152152
-- But for many setups, the LSP (`tsserver`) will work just fine
153-
tsserver = {},
153+
ts_ls = {},
154154
--
155155
lua_ls = {
156156
-- cmd = {...},

lua/custom/plugins/remote-nvim.lua

Lines changed: 47 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,51 @@ return {
66
"MunifTanjim/nui.nvim", -- To build the plugin UI
77
"nvim-telescope/telescope.nvim", -- For picking b/w different remote methods
88
},
9-
config = true
10-
-- config = function()
11-
-- require("remote-nvim").setup(
12-
-- {
13-
-- -- Configuration for devpod connections
14-
-- devpod = {
15-
-- binary = "devpod", -- Binary to use for devpod
16-
-- }
17-
-- }
18-
-- )
19-
-- end,
9+
config = function()
10+
require("remote-nvim").setup(
11+
{
12+
client_callback = function(port, workspace_config)
13+
local cmd = ("wezterm cli set-tab-title --pane-id $(wezterm cli spawn nvim --server localhost:%s --remote-ui) %s"):format(
14+
port,
15+
("'Remote: %s'"):format(workspace_config.host)
16+
)
17+
if vim.env.TERM == "xterm-kitty" then
18+
cmd = ("kitty -e nvim --server localhost:%s --remote-ui"):format(port)
19+
end
20+
vim.fn.jobstart(cmd, {
21+
detach = true,
22+
on_exit = function(job_id, exit_code, event_type)
23+
-- This function will be called when the job exits
24+
print("Client", job_id, "exited with code", exit_code, "Event type:", event_type)
25+
end,
26+
})
27+
end,
28+
29+
-- Remote configuration
30+
remote = {
31+
-- List of directories that should be copied over
32+
copy_dirs = {
33+
-- What to copy to remote's Neovim data directory
34+
data = {
35+
base = vim.fn.stdpath("data"),
36+
dirs = "*",
37+
compression = {
38+
enabled = true,
39+
},
40+
},
41+
-- What to copy to remote's Neovim cache directory
42+
cache = {
43+
base = vim.env.HOME, -- vim.fn.stdpath("cache"),
44+
dirs = {'.codeium'},
45+
compression = {
46+
enabled = true,
47+
},
48+
},
49+
},
50+
},
51+
52+
53+
}
54+
)
55+
end,
2056
}

0 commit comments

Comments
 (0)