@@ -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