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

View file

@ -1092,6 +1092,22 @@
"type": "github" "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": { "nvim-tree-lua": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -1349,6 +1365,7 @@
"nvim-neoclip": "nvim-neoclip", "nvim-neoclip": "nvim-neoclip",
"nvim-notify": "nvim-notify", "nvim-notify": "nvim-notify",
"nvim-session-manager": "nvim-session-manager", "nvim-session-manager": "nvim-session-manager",
"nvim-surround": "nvim-surround",
"nvim-tree-lua": "nvim-tree-lua", "nvim-tree-lua": "nvim-tree-lua",
"nvim-treesitter-context": "nvim-treesitter-context", "nvim-treesitter-context": "nvim-treesitter-context",
"nvim-ts-autotag": "nvim-ts-autotag", "nvim-ts-autotag": "nvim-ts-autotag",

View file

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

View file

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

View file

@ -9,5 +9,6 @@ _: {
./telescope ./telescope
./diffview ./diffview
./wakatime ./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";
};
}