diff --git a/bashrc b/bashrc index 9112987..7b49007 100644 --- a/bashrc +++ b/bashrc @@ -104,6 +104,7 @@ alias gl="git l" alias ga="git add" alias gpush="git push" alias gpull="git pull" +alias gcap="git commit --amend --no-edit && git push -f" # Docker-Compose alias dcu="docker-compose up -d --remove-orphans" @@ -120,6 +121,6 @@ alias kgn="kubectl get nodes -o wide" alias kgp="kubectl get pods -o wide" # Completions for various tools... -for bin in kubectl helm talosctl ; do +for bin in kubectl helm clusterctl talosctl flux ; do type $bin &>/dev/null && source <($bin completion bash) done diff --git a/config/nvim/lua/custom/chadrc.lua b/config/nvim/lua/custom/chadrc.lua new file mode 100644 index 0000000..1cf6af9 --- /dev/null +++ b/config/nvim/lua/custom/chadrc.lua @@ -0,0 +1,49 @@ +-- IMPORTANT NOTE : This is the user config, can be edited. Will be preserved if updated with internal updater +-- This file is for NvChad options & tools, custom settings are split between here and 'lua/custom/init.lua' + +local M = {} + +-- To use this file, copy the structure of `core/default_config.lua`, +-- examples of setting relative number & changing theme: + +M.options = { +-- relativenumber = true, + smarttab = true +} + +M.ui = { + theme = "tokyonight" +} + +-- NvChad included plugin options & overrides +M.plugins = { + options = { + statusline = { + style = "slant", + } + -- lspconfig = { + -- path of file containing setups of different lsps (ex : "custom.plugins.lspconfig"), read the docs for more info + -- setup_lspconf = "", + -- }, + }, + -- To change the Packer `config` of a plugin that comes with NvChad, + -- add a table entry below matching the plugin github name + -- '-' -> '_', remove any '.lua', '.nvim' extensions + -- this string will be called in a `require` + -- use "(custom.configs).my_func()" to call a function + -- use "custom.blankline" to call a file + --default_plugin_config_replace = {}, +} + +M.mappings = { + -- custom = {}, -- custom user mappings + + misc = { + cheatsheet = "ch", + line_number_toggle = "n", -- toggle line number + update_nvchad = "uu", + new_tab = "t", + }, +} + +return M diff --git a/setup.sh b/setup.sh index fbc8762..197f83d 100755 --- a/setup.sh +++ b/setup.sh @@ -20,8 +20,11 @@ function linkfiles { } linkfiles 'dotfiles/*' + +git clone https://github.com/NvChad/NvChad ~/.config/nvim +nvim -c "autocmd User PackerComplete quitall" -c "PackerSync" linkfiles 'config/*' -exit + # Install powerline if possible if which pip3 ; then pip3 install --user -U -r requirements.txt diff --git a/update.sh b/update.sh index 73d795f..75fa527 100755 --- a/update.sh +++ b/update.sh @@ -1,10 +1,11 @@ #!/bin/bash -GIT_DIRS=(. ~/.bash-git-prompt ~/.vim/bundle) +GIT_DIRS=(. ~/.vim/bundle ~/.config/nvim) for dir in ${GIT_DIRS[@]} ; do - cd $dir - git pull - cd - + git -C "$dir" git stash + git -C "$dir" pull + git -C "$dir" git stash pop done +nvim -c "autocmd User PackerComplete quitall" -c "PackerSync" vim -c ":PluginUpdate" -c ":q" -c ":q"