1
0
Fork 0

add some surround plugin configuration

This commit is contained in:
Luca Bilke 2024-02-21 14:41:57 +01:00
parent 887fa25cb3
commit 6fd3bab760
4 changed files with 762 additions and 736 deletions

View File

@ -4,4 +4,4 @@ require("lazy-init")
require("config.autocmds")
require("config.filetypes")
require("funcs").set_title()
require("funcs").set_maps(require("config.keymaps").maps)
require("funcs").set_maps(require("config.keymaps").maps())

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,21 @@
local M = { "kylechui/nvim-surround" }
M.event = { "BufReadPost", "BufNewFile" }
M.event = "VeryLazy"
M.config = true
M.opts = {
keymaps = require("config.keymaps").surround,
surrounds = {
["B"] = {
add = { "{{ ", " }}" },
find = function()
return require("nvim-surround.config").get_selection({ motion = "2a}" })
end,
delete = "^(.. ?)().-( ?..)()$",
},
},
aliases = {
["B"] = false,
},
}
return M

View File

@ -3,11 +3,13 @@
#
# TODO: detect existing repos and automatically modify config file accordingly
# TODO: function to detect unclean working trees
# TODO: Move update hooks to the actual .git/hooks directory
# TODO: Handle cloning
# TODO: Handle pulling
# TODO: Trigger hooks on clone/pull
#
print("This shit ain't done yet!");
exit;
print("This shit ain't done yet!\n");
# exit;
use strict;
use warnings;
@ -150,9 +152,6 @@ sub read_conf() {
# █ ████ ██ ████ ██ ██ ███ █
# ████████████████████████████████████████
# TODO: Handle cloning
# TODO: Handle pulling
# TODO: Trigger hooks on clone/pull
read_conf();
@ -179,12 +178,10 @@ foreach my $i ( keys @{ $conf{plugins} } ) {
$_ = `printf "$_"`;
}
foreach my $j ( keys @{ $plugin{targets} } ) {
# FIX: $_[$j] is empty
$last_handle++;
$handles[$last_handle]{plugin} = $i;
print("$plugin{api_url}/$_[$j]/$plugin{endpoint}\n");
set_curl( $last_handle, "$plugin{api_url}/$_[$j]/$plugin{endpoint}",
print("$plugin{api_url}/$plugin{targets}[$j]/$plugin{endpoint}\n");
set_curl( $last_handle, "$plugin{api_url}/$plugin{targets}[$j]/$plugin{endpoint}",
$plugin{extra_headers} );
add_callback( $last_handle, \&dump );
add_callback( $last_handle, \&json_decode );