Compare commits
No commits in common. "4cdadaaaf93a6b8775e4c6e66a3978366ce13c8a" and "b14d2680e32c0cb25ec3fedd646fbc006b49d3ea" have entirely different histories.
4cdadaaaf9
...
b14d2680e3
7 changed files with 11 additions and 54 deletions
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
local arrr = require 'arrr'
|
local arrr = require 'arrr'
|
||||||
local params = arrr {
|
local params = arrr {
|
||||||
{ "Sets the root to search in", "--root", "-r", true };
|
{ "Sets the root to search in", "--root", "-r", 'root' };
|
||||||
}{...}
|
}{...}
|
||||||
|
|
||||||
local buf = {}
|
local buf = {}
|
||||||
|
|
|
@ -7,8 +7,6 @@ temp=$(mktemp -p /dev/shm -d -t git-hook.XXXX)
|
||||||
export SRC_DIR=$(pwd)
|
export SRC_DIR=$(pwd)
|
||||||
export WORK_DIR=$(git rev-parse --show-toplevel)
|
export WORK_DIR=$(git rev-parse --show-toplevel)
|
||||||
|
|
||||||
export commit=commit
|
|
||||||
|
|
||||||
new() {
|
new() {
|
||||||
git status --porcelain | grep -E '^AM|^M|^A' | sed 's/^[^ ]* *//'
|
git status --porcelain | grep -E '^AM|^M|^A' | sed 's/^[^ ]* *//'
|
||||||
}
|
}
|
||||||
|
@ -24,30 +22,8 @@ check() {
|
||||||
end"
|
end"
|
||||||
}
|
}
|
||||||
|
|
||||||
get_marks() {
|
|
||||||
git status --porcelain | cut --bytes 4- | while read file
|
|
||||||
do
|
|
||||||
if [ -e "$temp/index/$file" ]
|
|
||||||
then
|
|
||||||
grep -n -i no$commit "$temp/index/$file" | sed "s/:/ /" | while read line
|
|
||||||
do
|
|
||||||
echo "$file:$line"
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
git checkout-index --prefix="$temp/index/" --all
|
git checkout-index --prefix="$temp/index/" --all
|
||||||
|
|
||||||
marks=$(get_marks)
|
|
||||||
if [ -n "$marks" ]
|
|
||||||
then
|
|
||||||
/bin/echo -e "\x1b[31m'no$commit' mark(s) found:\x1b[0m"
|
|
||||||
echo $marks
|
|
||||||
rm -rf $temp
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd $temp/index/
|
cd $temp/index/
|
||||||
|
|
||||||
ln -s "$WORK_DIR"/.git/ .git
|
ln -s "$WORK_DIR"/.git/ .git
|
||||||
|
|
|
@ -37,13 +37,5 @@ return function(_, bufnr)
|
||||||
|
|
||||||
vim.api.nvim_buf_create_user_command(bufnr, "LspWorkspaces", function()
|
vim.api.nvim_buf_create_user_command(bufnr, "LspWorkspaces", function()
|
||||||
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
|
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
|
||||||
end, {})
|
end, bufopts)
|
||||||
|
|
||||||
vim.api.nvim_buf_create_user_command(bufnr, "Rename", function(params)
|
|
||||||
if #params.fargs > 0 then
|
|
||||||
vim.lsp.buf.rename(params.fargs[1])
|
|
||||||
else
|
|
||||||
vim.lsp.buf.rename()
|
|
||||||
end
|
|
||||||
end, {nargs = "?"})
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
xpcall(function()
|
|
||||||
require("coq")
|
|
||||||
vim.api.nvim_command("command COQ COQnow --shut-up")
|
|
||||||
end, function()
|
|
||||||
vim.api.nvim_command("command COQ echoerr 'COQ not loaded.'")
|
|
||||||
end)
|
|
|
@ -1,14 +1,5 @@
|
||||||
local config = require 'lspconfig'
|
local config = require 'lspconfig'
|
||||||
|
|
||||||
local ensure_capabilities
|
|
||||||
xpcall(function()
|
|
||||||
ensure_capabilities = require("coq").lsp_ensure_capabilities
|
|
||||||
end, function()
|
|
||||||
function ensure_capabilities(...)
|
|
||||||
return ...
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
|
|
||||||
local default = { on_attach = require 'lsp.attach' }
|
local default = { on_attach = require 'lsp.attach' }
|
||||||
for _, language in ipairs {
|
for _, language in ipairs {
|
||||||
"html",
|
"html",
|
||||||
|
@ -20,5 +11,5 @@ for _, language in ipairs {
|
||||||
"standardrb",
|
"standardrb",
|
||||||
"zls",
|
"zls",
|
||||||
} do
|
} do
|
||||||
config[language].setup(ensure_capabilities(default))
|
config[language].setup(default)
|
||||||
end
|
end
|
||||||
|
|
|
@ -55,7 +55,7 @@ vim.api.nvim_create_user_command("Matcha", function(params)
|
||||||
end, {nargs="+"})
|
end, {nargs="+"})
|
||||||
|
|
||||||
vim.api.nvim_create_user_command("MatchaLocal", function(params)
|
vim.api.nvim_create_user_command("MatchaLocal", function(params)
|
||||||
vim.fn.setloclist(0, findLocations(params.fargs))
|
vim.fn.setloclist(0, findLocations(params.farts))
|
||||||
vim.cmd("lopen")
|
vim.cmd("lopen")
|
||||||
vim.cmd("lrewind")
|
vim.cmd("lrewind")
|
||||||
end, {nargs="+"})
|
end, {nargs="+"})
|
||||||
|
|
|
@ -30,11 +30,15 @@ use {
|
||||||
{
|
{
|
||||||
"hedyhli/outline.nvim", config = require 'config.outline';
|
"hedyhli/outline.nvim", config = require 'config.outline';
|
||||||
};
|
};
|
||||||
|
{ 'jinh0/eyeliner.nvim', config = function()
|
||||||
|
require('eyeliner').setup {
|
||||||
|
highlight_on_key = true;
|
||||||
|
dim = true;
|
||||||
|
}
|
||||||
|
end
|
||||||
|
};
|
||||||
'folke/twilight.nvim';
|
'folke/twilight.nvim';
|
||||||
'leafo/moonscript-vim';
|
'leafo/moonscript-vim';
|
||||||
'ms-jpq/coq_nvim';
|
|
||||||
'ms-jpq/coq.artifacts';
|
|
||||||
'ms-jpq/coq.thirdparty';
|
|
||||||
'neovim/nvim-lspconfig';
|
'neovim/nvim-lspconfig';
|
||||||
'pigpigyyy/Yuescript-vim';
|
'pigpigyyy/Yuescript-vim';
|
||||||
'vim-scripts/openscad.vim';
|
'vim-scripts/openscad.vim';
|
||||||
|
|
Loading…
Reference in a new issue