Compare commits

...

9 commits

13 changed files with 67 additions and 58 deletions

3
bin/kw Executable file
View file

@ -0,0 +1,3 @@
#!/bin/sh
exec date +%V -d "$*"

5
bin/tsk Executable file
View file

@ -0,0 +1,5 @@
#!/bin/sh
clear
task "$@"
task

View file

@ -20,8 +20,8 @@
[alias]
adog = log --all --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"
faddall = "! git status --porcelain | sed 's/^...//' | fzf -m --layout=reverse-list | xargs --open-tty git add"
fadd = "! git pick-modified | 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)"
h = log -1 --format=%h
hash = log -1 --format=%H
@ -34,6 +34,8 @@
track = add --intent-to-add
ts = timeshift
reword = commit --amend --no-verify
pick-modified = "! git status --porcelain | sed '/^??/d' | cut -b 4- | fzf --multi --layout reverse-list"
pm = pick-modified
[user]
useConfigOnly = true
[user "darkwiiplayer"]

View file

@ -26,34 +26,21 @@ git checkout-index --prefix="$temp/index/" --all
cd $temp/index/
ln -s "$WORK_DIR"/.git/ .git
if [ -n "$filter" ]; then
ln -s "$WORK_DIR"/.git/ .git
sh -c "$filter"
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
case $indentation in
tab|tabs)
/bin/echo -e "\x1b[2mChecking tab indentation"
/bin/echo -e "\x1b[2mChecking indentation: \x1b[32mtabs"
for file in $(new); do
check '\t' $file || error=1
done
;;
space|spaces)
/bin/echo -e "\x1b[2mChecking space indentation"
/bin/echo -e "\x1b[2mChecking indentation: \x1b[32mspaces"
for file in $(new); do
check ' ' $file || error=1
done
@ -67,11 +54,25 @@ case $indentation in
;;
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" ]
then exit 1
fi
cd "$WORK_DIR"/.git
cd "$WORK_DIR"
rm -rf $temp
hook=$(basename $0)

24
profile
View file

@ -8,27 +8,3 @@ fi
export LESSCHARSET=utf-8
# 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
View file

@ -0,0 +1,3 @@
{
"diagnostics.globals": ["vim"]
}

View file

@ -1,5 +1,3 @@
local opts = { noremap=true, silent=true }
return function(_, bufnr)
-- Enable completion triggered by <c-x><c-o>
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
@ -20,7 +18,7 @@ return function(_, bufnr)
end, bufopts)
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)
end
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>r', vim.lsp.buf.rename, 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.api.nvim_buf_create_user_command(bufnr, "Format", vim.lsp.buf.format, {})

20
vim/lua/lsp/setup.lua Normal file
View 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'
}

View file

@ -1,7 +1,10 @@
local function use(plugins)
return require('packer').startup(function(use)
for _, plugin in ipairs(plugins) do
use(plugin)
local success, message = pcall(use, plugin)
if not success then
print(message)
end
end
end)
end
@ -17,7 +20,7 @@ use {
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
"MunifTanjim/nui.nvim",
};
config = require 'neo-tree-setup';
config = require 'pack.setup.neotree';
};
{ 'jinh0/eyeliner.nvim', config = function()
require('eyeliner').setup {
@ -30,7 +33,7 @@ use {
'pigpigyyy/Yuescript-vim';
'vim-scripts/openscad.vim';
'ziglang/zig.vim';
-- Colour Schemes
-- Colour Schemes
'AlessandroYorba/Alduin';
'AlessandroYorba/Sierra';
'DarkWiiPlayer/papercolor-theme';

View file

@ -1,5 +1 @@
lua require('lspconfig').lua_ls.setup{ on_attach = require 'on_lsp_attach' }
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' }
lua require 'lsp.setup'

View file

@ -506,8 +506,6 @@ nnoremap <leader>! :Telescope diagnostics<CR>
nnoremap <leader>? :Telescope keymaps<CR>
nnoremap <leader>f :Telescope find_files<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_workspace_symbols<CR>
nnoremap <leader>ll :Telescope lsp_

2
vimrc
View file

@ -6,7 +6,7 @@ set runtimepath=$VIMRUNTIME,$HOME/.config/nvim,$HOME/.vim
let &rtp=&rtp.','.expand('<sfile>:p:h').'/vim'
if has("nvim")
lua pcall(require, "plugins")
lua require("pack/setup")
end
set nocompatible