feat: nvim-surround

This commit is contained in:
NotAShelf 2023-06-07 14:28:27 +03:00
parent 0c01fbc121
commit 2e40253457
No known key found for this signature in database
GPG Key ID: F0D14CCB5ED5AA22
8 changed files with 58 additions and 1 deletions

View File

@ -155,6 +155,7 @@ inputs: let
ccc.enable = isMaximal;
vim-wakatime.enable = isMaximal;
icon-picker.enable = isMaximal;
surround.enable = isMaximal;
diffview-nvim.enable = true;
motion = {
hop.enable = true;
@ -179,7 +180,7 @@ inputs: let
vim.ui = {
noice.enable = true;
colorizer.enable = true;
modes-nvim.enable = true;
modes-nvim.enable = false; # the theme looks terrible with catppuccin
illuminate.enable = true;
smartcolumn = {
enable = true;

View File

@ -1092,6 +1092,22 @@
"type": "github"
}
},
"nvim-surround": {
"flake": false,
"locked": {
"lastModified": 1685464327,
"narHash": "sha256-r3D5WTqEnIL1T3p7cmkRmBY8qgwFFJptM7BKNNsCT8k=",
"owner": "kylechui",
"repo": "nvim-surround",
"rev": "10b20ca7d9da1ac8df8339e140ffef94f9ab3b18",
"type": "github"
},
"original": {
"owner": "kylechui",
"repo": "nvim-surround",
"type": "github"
}
},
"nvim-tree-lua": {
"flake": false,
"locked": {
@ -1349,6 +1365,7 @@
"nvim-neoclip": "nvim-neoclip",
"nvim-notify": "nvim-notify",
"nvim-session-manager": "nvim-session-manager",
"nvim-surround": "nvim-surround",
"nvim-tree-lua": "nvim-tree-lua",
"nvim-treesitter-context": "nvim-treesitter-context",
"nvim-ts-autotag": "nvim-ts-autotag",

View File

@ -419,6 +419,11 @@
flake = false;
};
nvim-surround = {
url = "github:kylechui/nvim-surround";
flake = false;
};
# Note-taking
obsidian-nvim = {
url = "github:epwalsh/obsidian.nvim";

View File

@ -83,6 +83,7 @@ with lib; let
"elixir-tools"
"nvim-colorizer-lua"
"vim-illuminate"
"nvim-surround"
];
# You can either use the name of the plugin or a package.
pluginsType = with types;

View File

@ -9,5 +9,6 @@ _: {
./telescope
./diffview
./wakatime
./surround
];
}

View File

@ -0,0 +1,19 @@
{
config,
lib,
...
}:
with lib;
with builtins; let
cfg = config.vim.utility.surround;
in {
config = mkIf (cfg.enable) {
vim.startPlugins = [
"nvim-surround"
];
vim.luaConfigRC.surround = nvim.dag.entryAnywhere ''
require('nvim-surround').setup()
'';
};
}

View File

@ -0,0 +1,6 @@
_: {
imports = [
./config.nix
./surround.nix
];
}

View File

@ -0,0 +1,7 @@
{lib, ...}:
with lib;
with builtins; {
options.vim.utility.surround = {
enable = mkEnableOption "nvim-surround: add/change/delete surrounding delimiter pairs with ease";
};
}