add some surround plugin configuration
This commit is contained in:
parent
887fa25cb3
commit
6fd3bab760
4 changed files with 762 additions and 736 deletions
|
@ -4,4 +4,4 @@ require("lazy-init")
|
||||||
require("config.autocmds")
|
require("config.autocmds")
|
||||||
require("config.filetypes")
|
require("config.filetypes")
|
||||||
require("funcs").set_title()
|
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
|
@ -1,7 +1,21 @@
|
||||||
local M = { "kylechui/nvim-surround" }
|
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
|
return M
|
||||||
|
|
|
@ -3,11 +3,13 @@
|
||||||
#
|
#
|
||||||
# TODO: detect existing repos and automatically modify config file accordingly
|
# TODO: detect existing repos and automatically modify config file accordingly
|
||||||
# TODO: function to detect unclean working trees
|
# 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!");
|
print("This shit ain't done yet!\n");
|
||||||
exit;
|
# exit;
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
|
@ -150,9 +152,6 @@ sub read_conf() {
|
||||||
# █ ████ ██ ████ ██ ██ ███ █
|
# █ ████ ██ ████ ██ ██ ███ █
|
||||||
# ████████████████████████████████████████
|
# ████████████████████████████████████████
|
||||||
|
|
||||||
# TODO: Handle cloning
|
|
||||||
# TODO: Handle pulling
|
|
||||||
# TODO: Trigger hooks on clone/pull
|
|
||||||
|
|
||||||
read_conf();
|
read_conf();
|
||||||
|
|
||||||
|
@ -179,12 +178,10 @@ foreach my $i ( keys @{ $conf{plugins} } ) {
|
||||||
$_ = `printf "$_"`;
|
$_ = `printf "$_"`;
|
||||||
}
|
}
|
||||||
foreach my $j ( keys @{ $plugin{targets} } ) {
|
foreach my $j ( keys @{ $plugin{targets} } ) {
|
||||||
|
|
||||||
# FIX: $_[$j] is empty
|
|
||||||
$last_handle++;
|
$last_handle++;
|
||||||
$handles[$last_handle]{plugin} = $i;
|
$handles[$last_handle]{plugin} = $i;
|
||||||
print("$plugin{api_url}/$_[$j]/$plugin{endpoint}\n");
|
print("$plugin{api_url}/$plugin{targets}[$j]/$plugin{endpoint}\n");
|
||||||
set_curl( $last_handle, "$plugin{api_url}/$_[$j]/$plugin{endpoint}",
|
set_curl( $last_handle, "$plugin{api_url}/$plugin{targets}[$j]/$plugin{endpoint}",
|
||||||
$plugin{extra_headers} );
|
$plugin{extra_headers} );
|
||||||
add_callback( $last_handle, \&dump );
|
add_callback( $last_handle, \&dump );
|
||||||
add_callback( $last_handle, \&json_decode );
|
add_callback( $last_handle, \&json_decode );
|
Loading…
Add table
Add a link
Reference in a new issue