Skip to content

Commit

Permalink
feat: adding remote nvim plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukerten committed Nov 30, 2024
1 parent cc95b37 commit 1185fbc
Show file tree
Hide file tree
Showing 8 changed files with 104 additions and 16 deletions.
17 changes: 17 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 8 additions & 12 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,6 @@
url = "github:folke/noice.nvim";
flake = false;
};
plugins-nui = {
url = "github:MunifTanjim/nui.nvim";
flake = false;
};
plugins-notify = {
url = "github:rcarriga/nvim-notify";
flake = false;
Expand Down Expand Up @@ -239,6 +235,10 @@
url = "github:moll/vim-bbye";
flake = false;
};
plugins-remote-nvim = {
url = "github:amitds1997/remote-nvim.nvim";
flake = false;
};

# Key binding help
plugins-which-key = {
Expand All @@ -249,6 +249,10 @@
url = "github:nvim-lua/plenary.nvim";
flake = false;
};
plugins-nui = {
url = "github:MunifTanjim/nui.nvim";
flake = false;
};
plugins-nvim-web-devicons = {
url = "github:kyazdani42/nvim-web-devicons";
flake = false;
Expand Down Expand Up @@ -294,13 +298,6 @@
trouble.enable = true;
};

# Git
# vim.git = {
# gitsigns.enable = true;
# gitsigns.codeActions = true;
# lazygit.enable = true;
# };

# Languages
vim.languages = {
enableLSP = true;
Expand Down Expand Up @@ -334,7 +331,6 @@
crates.enable = true;
};
};

vim.utils.enable = true;
vim.visual.enable = true;
};
Expand Down
2 changes: 2 additions & 0 deletions modules/utils/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ in {
./kommentary.nix
./lazygit.nix
./obsidian.nix
./remote.nix
./telescope.nix
./undo.nix
./vimwiki.nix
Expand All @@ -27,6 +28,7 @@ in {
kommentary.enable = mkDefault true;
lazygit.enable = mkDefault true;
obsidian.enable = mkDefault true;
remote.enable = mkDefault true;
telescope.enable = mkDefault true;
undo.enable = mkDefault true;
vimwiki.enable = mkDefault true;
Expand Down
2 changes: 1 addition & 1 deletion modules/utils/kommentary.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ in {
"kommentary"
];

vim.luaConfigRC.sql =
vim.luaConfigRC.kommentary =
nvim.dag.entryAnywhere
/*
lua
Expand Down
2 changes: 1 addition & 1 deletion modules/utils/obsidian.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ in {
"obsidian"
];

vim.luaConfigRC.sql =
vim.luaConfigRC.obsidian =
nvim.dag.entryAnywhere
/*
lua
Expand Down
73 changes: 73 additions & 0 deletions modules/utils/remote.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{
pkgs,
config,
lib,
...
}:
with lib;
with builtins; let
cfg = config.vim.utils.remote;
in {
options.vim.utils.remote = {
enable = mkEnableOption "enable remote nvim plugin";
};

config = mkIf (cfg.enable) {
vim.startPlugins = [
"plenary-nvim"
"nui"
"telescope"
"remote-nvim"
];

vim.luaConfigRC.obsidian =
nvim.dag.entryAnywhere # lua
''
local remoteConfig = {
-- Configuration for devpod connections
devpod = {
search_style = "current_dir_only",
dotfiles = {
path = nil,
install_script = nil
},
gpg_agent_forwarding = false,
container_list = "running_only",
},
ssh_config = {
ssh_prompts = {
{
match = "password:",
type = "secret",
value_type = "dynamic",
value = "",
},
{
match = "continue connecting (yes/no/[fingerprint])?",
type = "plain",
value_type = "static",
value = "",
},
{
match = "Enter passphrase for key",
type = "secret",
value_type = "dynamic",
value = "",
}
},
},
progress_view = {
type = "popup",
},
offline_mode = {
enabled = false,
no_github = false,
},
}
require("remote-nvim").setup(remoteConfig)
'';
};
}


2 changes: 1 addition & 1 deletion modules/utils/undo.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ in {
"undotree"
];

vim.luaConfigRC.sql =
vim.luaConfigRC.undo =
nvim.dag.entryAnywhere
/*
lua
Expand Down
2 changes: 1 addition & 1 deletion modules/utils/vimwiki.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ in {
"vimwiki"
];

vim.luaConfigRC.sql =
vim.luaConfigRC.vimwiki =
nvim.dag.entryAnywhere
/*
lua
Expand Down

0 comments on commit 1185fbc

Please sign in to comment.