Compare commits
9 commits
67477adc1b
...
a6be7b1e30
Author | SHA1 | Date | |
---|---|---|---|
a6be7b1e30 | |||
db110afdae | |||
95cb7147ed | |||
0ba189421c | |||
bc7213032f | |||
2756760426 | |||
25f7386c94 | |||
8ee15aeb6c | |||
d9be01655a |
13 changed files with 67 additions and 58 deletions
3
bin/kw
Executable file
3
bin/kw
Executable file
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
exec date +%V -d "$*"
|
5
bin/tsk
Executable file
5
bin/tsk
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
clear
|
||||||
|
task "$@"
|
||||||
|
task
|
|
@ -20,8 +20,8 @@
|
||||||
[alias]
|
[alias]
|
||||||
adog = log --all --decorate --oneline --graph --date-order
|
adog = log --all --decorate --oneline --graph --date-order
|
||||||
dog = log --decorate --oneline --graph --date-order
|
dog = log --decorate --oneline --graph --date-order
|
||||||
fadd = "! git status --porcelain | sed -e '/^??/d' -e 's/^...//' | fzf -m --layout=reverse-list | xargs --open-tty git add"
|
fadd = "! git pick-modified | xargs --open-tty git add"
|
||||||
faddall = "! git status --porcelain | sed 's/^...//' | fzf -m --layout=reverse-list | xargs --open-tty git add"
|
faddall = "! git status --porcelain | cut -b 4- | fzf --multi --layout=reverse-list | xargs --open-tty git add"
|
||||||
fixup = "!git commit --patch --no-edit --amend $(git diff --name-only HEAD~1..HEAD)"
|
fixup = "!git commit --patch --no-edit --amend $(git diff --name-only HEAD~1..HEAD)"
|
||||||
h = log -1 --format=%h
|
h = log -1 --format=%h
|
||||||
hash = log -1 --format=%H
|
hash = log -1 --format=%H
|
||||||
|
@ -34,6 +34,8 @@
|
||||||
track = add --intent-to-add
|
track = add --intent-to-add
|
||||||
ts = timeshift
|
ts = timeshift
|
||||||
reword = commit --amend --no-verify
|
reword = commit --amend --no-verify
|
||||||
|
pick-modified = "! git status --porcelain | sed '/^??/d' | cut -b 4- | fzf --multi --layout reverse-list"
|
||||||
|
pm = pick-modified
|
||||||
[user]
|
[user]
|
||||||
useConfigOnly = true
|
useConfigOnly = true
|
||||||
[user "darkwiiplayer"]
|
[user "darkwiiplayer"]
|
||||||
|
|
|
@ -26,34 +26,21 @@ git checkout-index --prefix="$temp/index/" --all
|
||||||
|
|
||||||
cd $temp/index/
|
cd $temp/index/
|
||||||
|
|
||||||
|
ln -s "$WORK_DIR"/.git/ .git
|
||||||
if [ -n "$filter" ]; then
|
if [ -n "$filter" ]; then
|
||||||
ln -s "$WORK_DIR"/.git/ .git
|
|
||||||
sh -c "$filter"
|
sh -c "$filter"
|
||||||
git add --all
|
git add --all
|
||||||
rm .git
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "$validate" ]; then
|
|
||||||
/bin/echo -e "\x1b[33mValidating commit\x1b[0m"
|
|
||||||
/bin/echo -e "\x1b[2mλ $validate\x1b[0m"
|
|
||||||
if sh -c "$validate"
|
|
||||||
then
|
|
||||||
/bin/echo -e "\x1b[32mValidation Passed!\x1b[0m"
|
|
||||||
else
|
|
||||||
error=1
|
|
||||||
/bin/echo -e "\x1b[1;31mValidation Failed!\x1b[0m"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case $indentation in
|
case $indentation in
|
||||||
tab|tabs)
|
tab|tabs)
|
||||||
/bin/echo -e "\x1b[2mChecking tab indentation"
|
/bin/echo -e "\x1b[2mChecking indentation: \x1b[32mtabs"
|
||||||
for file in $(new); do
|
for file in $(new); do
|
||||||
check '\t' $file || error=1
|
check '\t' $file || error=1
|
||||||
done
|
done
|
||||||
;;
|
;;
|
||||||
space|spaces)
|
space|spaces)
|
||||||
/bin/echo -e "\x1b[2mChecking space indentation"
|
/bin/echo -e "\x1b[2mChecking indentation: \x1b[32mspaces"
|
||||||
for file in $(new); do
|
for file in $(new); do
|
||||||
check ' ' $file || error=1
|
check ' ' $file || error=1
|
||||||
done
|
done
|
||||||
|
@ -67,11 +54,25 @@ case $indentation in
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
if [ -n "$validate" ]; then
|
||||||
|
/bin/echo -e "\x1b[33mValidating commit\x1b[0m"
|
||||||
|
/bin/echo -e "\x1b[2mλ $validate\x1b[0m"
|
||||||
|
# if sh -c "$validate"
|
||||||
|
# then
|
||||||
|
# /bin/echo -e "\x1b[32mValidation Passed!\x1b[0m"
|
||||||
|
# else
|
||||||
|
# error=1
|
||||||
|
# /bin/echo -e "\x1b[1;31mValidation Failed!\x1b[0m"
|
||||||
|
# fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm .git
|
||||||
|
|
||||||
if [ -n "$error" ]
|
if [ -n "$error" ]
|
||||||
then exit 1
|
then exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd "$WORK_DIR"/.git
|
cd "$WORK_DIR"
|
||||||
rm -rf $temp
|
rm -rf $temp
|
||||||
|
|
||||||
hook=$(basename $0)
|
hook=$(basename $0)
|
||||||
|
|
24
profile
24
profile
|
@ -8,27 +8,3 @@ fi
|
||||||
export LESSCHARSET=utf-8
|
export LESSCHARSET=utf-8
|
||||||
|
|
||||||
# export MANPATH="$HOME/.local/share/man:$(manpath)"
|
# export MANPATH="$HOME/.local/share/man:$(manpath)"
|
||||||
|
|
||||||
export LUA_PATH_5_3="$HOME/.luarocks/share/lua/5.3/?.lua;"\
|
|
||||||
"$HOME/.luarocks/share/lua/5.3/?/init.lua;"\
|
|
||||||
"lua_modules/share/lua/5.3/?.lua;"\
|
|
||||||
"lua_modules/share/lua/5.3/?/init.lua;"\
|
|
||||||
"$HOME/darkrc/lua/?.lua;"\
|
|
||||||
";"
|
|
||||||
export LUA_CPATH_5_3="$HOME/.luarocks/lib/lua/5.3/?.so;"\
|
|
||||||
"$HOME/.luarocks/lib/lua/5.3/?/init.so;"\
|
|
||||||
"lua_modules/lib/lua/5.3/?.so;"\
|
|
||||||
"lua_modules/lib/lua/5.3/?/init.so;"\
|
|
||||||
";"
|
|
||||||
|
|
||||||
export LUA_PATH_5_1="$HOME/.luarocks/share/lua/5.1/?.lua;"\
|
|
||||||
"$HOME/.luarocks/share/lua/5.1/?/init.lua;"\
|
|
||||||
"lua_modules/share/lua/5.1/?.lua;"\
|
|
||||||
"lua_modules/share/lua/5.1/?/init.lua;"\
|
|
||||||
"$HOME/darkrc/lua/?.lua;"\
|
|
||||||
";"
|
|
||||||
export LUA_CPATH_5_1="$HOME/.luarocks/lib/lua/5.1/?.so;"\
|
|
||||||
"$HOME/.luarocks/lib/lua/5.1/?/init.so;"\
|
|
||||||
"lua_modules/lib/lua/5.1/?.so;"\
|
|
||||||
"lua_modules/lib/lua/5.1/?/init.so;"\
|
|
||||||
";"
|
|
||||||
|
|
3
vim/.luarc.json
Normal file
3
vim/.luarc.json
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"diagnostics.globals": ["vim"]
|
||||||
|
}
|
|
@ -1,5 +1,3 @@
|
||||||
local opts = { noremap=true, silent=true }
|
|
||||||
|
|
||||||
return function(_, bufnr)
|
return function(_, bufnr)
|
||||||
-- Enable completion triggered by <c-x><c-o>
|
-- Enable completion triggered by <c-x><c-o>
|
||||||
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
|
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
|
||||||
|
@ -20,7 +18,7 @@ return function(_, bufnr)
|
||||||
end, bufopts)
|
end, bufopts)
|
||||||
|
|
||||||
vim.api.nvim_buf_create_user_command(bufnr, "LspSetWorkspace", function()
|
vim.api.nvim_buf_create_user_command(bufnr, "LspSetWorkspace", function()
|
||||||
for i, workspace in ipairs(vim.lsp.buf.list_workspace_folders()) do
|
for _, workspace in ipairs(vim.lsp.buf.list_workspace_folders()) do
|
||||||
vim.lsp.buf.remove_workspace_folder(workspace)
|
vim.lsp.buf.remove_workspace_folder(workspace)
|
||||||
end
|
end
|
||||||
vim.lsp.buf.add_workspace_folder(vim.cmd("pwd"))
|
vim.lsp.buf.add_workspace_folder(vim.cmd("pwd"))
|
||||||
|
@ -29,7 +27,11 @@ return function(_, bufnr)
|
||||||
vim.keymap.set('n', '<leader>D', vim.lsp.buf.type_definition, bufopts)
|
vim.keymap.set('n', '<leader>D', vim.lsp.buf.type_definition, bufopts)
|
||||||
vim.keymap.set('n', '<leader>r', vim.lsp.buf.rename, bufopts)
|
vim.keymap.set('n', '<leader>r', vim.lsp.buf.rename, bufopts)
|
||||||
vim.keymap.set('n', '<leader>ca', vim.lsp.buf.code_action, bufopts)
|
vim.keymap.set('n', '<leader>ca', vim.lsp.buf.code_action, bufopts)
|
||||||
vim.keymap.set('n', 'gr', vim.lsp.buf.references, bufopts)
|
if require("telescope") then
|
||||||
|
vim.keymap.set('n', 'gr', function() vim.cmd("Telescope lsp_references") end, bufopts)
|
||||||
|
else
|
||||||
|
vim.keymap.set('n', 'gr', vim.lsp.buf.references, bufopts)
|
||||||
|
end
|
||||||
--vim.keymap.set('n', '<leader>f', vim.lsp.buf.formatting, bufopts)
|
--vim.keymap.set('n', '<leader>f', vim.lsp.buf.formatting, bufopts)
|
||||||
|
|
||||||
vim.api.nvim_buf_create_user_command(bufnr, "Format", vim.lsp.buf.format, {})
|
vim.api.nvim_buf_create_user_command(bufnr, "Format", vim.lsp.buf.format, {})
|
20
vim/lua/lsp/setup.lua
Normal file
20
vim/lua/lsp/setup.lua
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
local config = require 'lspconfig'
|
||||||
|
|
||||||
|
config.lua_ls.setup {
|
||||||
|
on_attach = require 'lsp.attach'
|
||||||
|
}
|
||||||
|
config.zls.setup {
|
||||||
|
on_attach = require 'lsp.attach'
|
||||||
|
}
|
||||||
|
config.standardrb.setup {
|
||||||
|
on_attach = require 'lsp.attach'
|
||||||
|
}
|
||||||
|
config.clangd.setup {
|
||||||
|
on_attach = require 'lsp.attach'
|
||||||
|
}
|
||||||
|
config.solargraph.setup {
|
||||||
|
on_attach = require 'lsp.attach'
|
||||||
|
}
|
||||||
|
config.denols.setup {
|
||||||
|
on_attach = require 'lsp.attach'
|
||||||
|
}
|
|
@ -1,7 +1,10 @@
|
||||||
local function use(plugins)
|
local function use(plugins)
|
||||||
return require('packer').startup(function(use)
|
return require('packer').startup(function(use)
|
||||||
for _, plugin in ipairs(plugins) do
|
for _, plugin in ipairs(plugins) do
|
||||||
use(plugin)
|
local success, message = pcall(use, plugin)
|
||||||
|
if not success then
|
||||||
|
print(message)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
@ -17,7 +20,7 @@ use {
|
||||||
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
|
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
|
||||||
"MunifTanjim/nui.nvim",
|
"MunifTanjim/nui.nvim",
|
||||||
};
|
};
|
||||||
config = require 'neo-tree-setup';
|
config = require 'pack.setup.neotree';
|
||||||
};
|
};
|
||||||
{ 'jinh0/eyeliner.nvim', config = function()
|
{ 'jinh0/eyeliner.nvim', config = function()
|
||||||
require('eyeliner').setup {
|
require('eyeliner').setup {
|
||||||
|
@ -30,7 +33,7 @@ use {
|
||||||
'pigpigyyy/Yuescript-vim';
|
'pigpigyyy/Yuescript-vim';
|
||||||
'vim-scripts/openscad.vim';
|
'vim-scripts/openscad.vim';
|
||||||
'ziglang/zig.vim';
|
'ziglang/zig.vim';
|
||||||
-- Colour Schemes
|
-- Colour Schemes
|
||||||
'AlessandroYorba/Alduin';
|
'AlessandroYorba/Alduin';
|
||||||
'AlessandroYorba/Sierra';
|
'AlessandroYorba/Sierra';
|
||||||
'DarkWiiPlayer/papercolor-theme';
|
'DarkWiiPlayer/papercolor-theme';
|
|
@ -1,5 +1 @@
|
||||||
lua require('lspconfig').lua_ls.setup{ on_attach = require 'on_lsp_attach' }
|
lua require 'lsp.setup'
|
||||||
lua require('lspconfig').zls.setup{ on_attach = require 'on_lsp_attach' }
|
|
||||||
lua require('lspconfig').standardrb.setup{ on_attach = require 'on_lsp_attach' }
|
|
||||||
lua require('lspconfig').clangd.setup{ on_attach = require 'on_lsp_attach' }
|
|
||||||
lua require('lspconfig').solargraph.setup{ on_attach = require 'on_lsp_attach' }
|
|
||||||
|
|
|
@ -506,8 +506,6 @@ nnoremap <leader>! :Telescope diagnostics<CR>
|
||||||
nnoremap <leader>? :Telescope keymaps<CR>
|
nnoremap <leader>? :Telescope keymaps<CR>
|
||||||
nnoremap <leader>f :Telescope find_files<CR>
|
nnoremap <leader>f :Telescope find_files<CR>
|
||||||
nnoremap <leader>b :Telescope buffers<CR>
|
nnoremap <leader>b :Telescope buffers<CR>
|
||||||
nnoremap <leader>ld :Telescope lsp_definitions<CR>
|
|
||||||
nnoremap <leader>lr :Telescope lsp_references<CR>
|
|
||||||
nnoremap <leader>ls :Telescope lsp_document_symbols<CR>
|
nnoremap <leader>ls :Telescope lsp_document_symbols<CR>
|
||||||
nnoremap <leader>lS :Telescope lsp_workspace_symbols<CR>
|
nnoremap <leader>lS :Telescope lsp_workspace_symbols<CR>
|
||||||
nnoremap <leader>ll :Telescope lsp_
|
nnoremap <leader>ll :Telescope lsp_
|
||||||
|
|
2
vimrc
2
vimrc
|
@ -6,7 +6,7 @@ set runtimepath=$VIMRUNTIME,$HOME/.config/nvim,$HOME/.vim
|
||||||
let &rtp=&rtp.','.expand('<sfile>:p:h').'/vim'
|
let &rtp=&rtp.','.expand('<sfile>:p:h').'/vim'
|
||||||
|
|
||||||
if has("nvim")
|
if has("nvim")
|
||||||
lua pcall(require, "plugins")
|
lua require("pack/setup")
|
||||||
end
|
end
|
||||||
|
|
||||||
set nocompatible
|
set nocompatible
|
||||||
|
|
Loading…
Reference in a new issue