diff --git a/README.org b/README.org index 99f3edf..7ad8a4b 100644 --- a/README.org +++ b/README.org @@ -38,14 +38,12 @@ A repository of my personal server configuration files. - [[http://www.gnu.org/software/stow/][stow]] * Applications -- [[https://github.com/alacritty/alacritty][alacritty]] - [[https://the.exa.website/][exa]] +- [[https://github.com/junegunn/fzf][fzf]] - [[https://git-scm.com/][git]] -- [[https://gnupg.org/][gnupg]] - [[https://github.com/gokcehan/lf][lf]] - [[https://neovim.io/][neovim]] - [[https://tmux.github.io/][tmux]] -- [[https://vifm.info/][vifm]] * Zsh ** Theme @@ -56,6 +54,7 @@ A repository of my personal server configuration files. - [[https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/docker][docker]] - [[https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/docker-compose][docker-compose]] - [[https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/extract][extract]] +- [[https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/fzf][fzf]] - [[https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/git][git]] - [[https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/gitignore][gitignore]] - [[https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/ripgrep][ripgrep]] @@ -64,6 +63,7 @@ A repository of my personal server configuration files. - [[https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/systemd][systemd]] - [[https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/tmux][tmux]] - [[https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/vi-mode][vi-mode]] +- [[https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/yarn][yarn]] - [[https://github.com/zsh-users/zsh-autosuggestions][zsh-autosuggestions]] - [[https://github.com/zsh-users/zsh-syntax-highlighting][zsh-syntax-highlighting]] @@ -89,14 +89,13 @@ A repository of my personal server configuration files. ** Plugins *** General - [[https://github.com/bling/vim-bufferline][bling/vim-bufferline]] -- [[easymotion/vim-easymotion]] +- [[https://github.com/ctrlpvim/ctrlp.vim][ctrlp/ctrlp.vim]] - [[https://github.com/farmergreg/vim-lastplace][farmergreg/vim-lastplace]] -- [[https://github.com/jiangmiao/auto-pairs][jiangmiao/auto-pairs]] -- [[https://github.com/kien/ctrlp.vim][kien/ctrlp.vim]] +-[[https://github.com/junegunn/fzf][ junegunn/fzf]] +- [[https://github.com/justinmk/vim-sneak][justinmk/vim-sneak]] - [[https://github.com/mbbill/undotree][mbbill/undotree]] - [[https://github.com/mhinz/vim-signify][mhinz/vim-signify]] - [[https://github.com/myusuf3/numbers.vim][myusuf3/numbers.vim]] -- [[https://github.com/nathanaelkane/vim-indent-guides][nathanaelkane/vim-indent-guides]] - [[https://github.com/preservim/nerdtree][preservim/nerdtree]] - [[https://github.com/rhysd/conflict-marker.vim][rhysd/conflict-marker.vim]] - [[https://github.com/terryma/vim-multiple-cursors][terryma/vim-multiple-cursors]] @@ -104,13 +103,16 @@ A repository of my personal server configuration files. - [[https://github.com/tpope/vim-surround][tpope/vim-surround]] - [[https://github.com/vim-airline/vim-airline][vim-airline/vim-airline]] *** Programming -- [[https://github.com/autozimu/LanguageClient-neovim][autozimu/LanguageClient-neovim]] +- [[https://github.com/airblade/vim-gitgutter][airblade/vim-gitgutter]] +- [[https://github.com/dense-analysis/ale][dense-analysis/ale]] - [[https://github.com/godlygeek/tabular][godlygeek/tabular]] -- [[https://github.com/majutsushi/tagbar][majutsushi/tagbar]] +- [[https://github.com/neoclide/coc.nvim][neoclice/coc.nvim]] - [[https://github.com/preservim/nerdcommenter][preservim/nerdcommenter]] -- [[https://github.com/Shougo/deoplete.nvim][Shougo/deoplete.nvim]] +- [[https://github.com/RRethy/vim-hexokinase][RRethy/vim-hexokinase]] +- [[https://github.com/sheerun/vim-polyglot][sheerun/vim-polyglot]] - [[https://github.com/tpope/vim-fugitive][tpope/vim-fugitive]] - [[https://github.com/Xuyuanp/nerdtree-git-plugin][Xuyuanp/nerdtree-git-plugin]] +-[[https://github.com/Yggdroot/indentLine][ Yggdroot/indentLine]] *** UI - [[https://github.com/morhetz/gruvbox][morhetz/gruvbox]] - [[https://github.com/ryanoasis/vim-devicons][ryanoasis/vim-devicons]] diff --git a/fish/.config/omf/init.fish b/fish/.config/omf/init.fish index 0a0a1ba..aafc0f2 100644 --- a/fish/.config/omf/init.fish +++ b/fish/.config/omf/init.fish @@ -12,22 +12,31 @@ end path_if_exists ~/.config/yarn/global/node_modules/.bin path_if_exists ~/.local/bin path_if_exists ~/.emacs.d/bin +path_if_exists ~/.local/share/go/bin +path_if_exists ~/.local/share/cargo/bin # Set GPG TTY set GPG_TTY (tty) -# pkg editor -set -g VISUAL "nvim" - # editor -set -g EDITOR "nvim" +set -xg EDITOR "nvim" # bobthefish -set -g theme_nerd_fonts yes -set -g theme_color_scheme gruvbox +set -xg theme_nerd_fonts yes +set -xg theme_color_scheme gruvbox # sudope -set -g sudope_sequence \e\e +set -xg sudope_sequence \e\e + +# Set tmux tmpdir to proper directory +set -xg TMUX_TMPDIR "$XDG_RUNTIME_DIR" + +# Rust +set -xg CARGO_HOME ~/.local/share/cargo +set -xg RUSTUP_HOME ~/.local/share/rustup + +# Golang +set -xg GOPATH ~/.local/share/go # nvim alias alias v="nvim" @@ -37,11 +46,180 @@ alias sv="sudo nvim" alias ls="exa" alias l="exa -al" -# vifm alias -alias vifm="vifmrun" - # git alaises alias gpoat="git push origin --all && git push origin --tags" +alias gs="git status" +alias gd="git diff" +alias g="git" + +# Prevent mv & rm oopsies +alias mv="mv -i" +alias rm="rm -i" + +# Load lfcd wiith proper icons +function lf + set -lx LF_ICONS "\ +di=:\ +fi=:\ +ln=:\ +or=:\ +ex=:\ +*.c=:\ +*.cc=:\ +*.clj=:\ +*.coffee=:\ +*.cpp=:\ +*.css=:\ +*.d=:\ +*.dart=:\ +*.erl=:\ +*.exs=:\ +*.fs=:\ +*.go=:\ +*.h=:\ +*.hh=:\ +*.hpp=:\ +*.hs=:\ +*.html=:\ +*.java=:\ +*.jl=:\ +*.js=:\ +*.json=:\ +*.lua=:\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.emf=:\ +*.ogv=:\ +*.ogx=:\ +*.aac=:\ +*.au=:\ +*.flac=:\ +*.m4a=:\ +*.mid=:\ +*.midi=:\ +*.mka=:\ +*.mp3=:\ +*.mpc=:\ +*.ogg=:\ +*.ra=:\ +*.wav=:\ +*.oga=:\ +*.opus=:\ +*.spx=:\ +*.xspf=:\ +*.pdf=:\ +*.nix=:\ +" + + /usr/bin/lf +end + # Set fzf keybindings here for now as they don't work with stable version of omf https://github.com/jethrokuan/fzf/issues/109 bind \co '__fzf_find_file' diff --git a/neovim/.config/nvim/init.vim b/neovim/.config/nvim/init.vim index 942689e..c07d237 100644 --- a/neovim/.config/nvim/init.vim +++ b/neovim/.config/nvim/init.vim @@ -13,15 +13,17 @@ call plug#begin() " General { + " Navigation { + Plug 'unblevable/quick-scope' + " } Plug 'bling/vim-bufferline' - Plug 'easymotion/vim-easymotion' Plug 'farmergreg/vim-lastplace' - Plug 'jiangmiao/auto-pairs' - Plug 'kien/ctrlp.vim' + Plug 'junegunn/fzf' + Plug 'justinmk/vim-sneak' + Plug 'ctrlpvim/ctrlp.vim' Plug 'mbbill/undotree' Plug 'mhinz/vim-signify' Plug 'myusuf3/numbers.vim' - Plug 'nathanaelkane/vim-indent-guides' Plug 'preservim/nerdtree' Plug 'rhysd/conflict-marker.vim' Plug 'terryma/vim-multiple-cursors' @@ -29,23 +31,20 @@ Plug 'tpope/vim-surround' Plug 'vim-airline/vim-airline' " } - " Programming { - Plug 'autozimu/LanguageClient-neovim', { - \ 'branch': 'next', - \ 'do': 'bash install.sh', - \ } + Plug 'airblade/vim-gitgutter' + Plug 'dense-analysis/ale' Plug 'godlygeek/tabular' - if executable('ctags') - Plug 'majutsushi/tagbar' - endif + Plug 'neoclide/coc.nvim', {'branch': 'release'} Plug 'preservim/nerdcommenter' - Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } + Plug 'rrethy/vim-hexokinase', { 'do': 'make hexokinase' } + Plug 'sheerun/vim-polyglot' Plug 'tpope/vim-fugitive' Plug 'Xuyuanp/nerdtree-git-plugin' + Plug 'Yggdroot/indentLine' " } - + " UI { Plug 'morhetz/gruvbox' " This has to be loaded last to work @@ -78,6 +77,7 @@ highlight clear LineNr " Current line number row will have same background color in relative mode set ignorecase " Ignore case on search + set smartcase " Don't ignore upper case characters on search set scrolljump=5 " Lines to scroll when cursor leaves screen set scrolloff=3 " Minimum lines to keep above and below cursor set foldenable " Auto fold code @@ -110,6 +110,16 @@ vnoremap < >gv + " LanguageClient-neovim + nnoremap :call LanguageClient_contextMenu() + map lk :call LanguageClient#textDocument_hover() + map lg :call LanguageClient#textDocument_definition() + map lr :call LanguageClient#textDocument_rename() + map lf :call LanguageClient#textDocument_formatting() + map lb :call LanguageClient#textDocument_references() + map la :call LanguageClient#textDocument_codeAction() + map ls :call LanguageClient#textDocument_documentSymbol() + " For when you forget to sudo.. Really Write the file. cmap w!! w !sudo tee % >/dev/null " } @@ -135,13 +145,6 @@ map :NERDTreeToggle " } - " Tagbar { - if executable('ctags') - " Tagbar panel - map tt :TagbarToggle - endif - " } - " NerdCommenter { " Add spaces after comment delimiters by default let g:NERDSpaceDelims = 1 @@ -152,8 +155,47 @@ let g:airline_powerline_fonts=1 " } - " Deoplete { - " Load deoplete on startup - let g:deoplete#enable_at_startup = 1 + " hexokinase { + set termguicolors + " } + + " haskell { + autocmd BufWrite *.hs :%!stylish-haskell + " } + + " coc { + vmap f (coc-format-selected) + nmap f (coc-format-selected) + + " Run jest for current project + command! -nargs=0 Jest :call CocAction('runCommand', 'jest.projectTest') + + " Run jest for current file + command! -nargs=0 JestCurrent :call CocAction('runCommand', 'jest.fileTest', ['%']) + + " Run jest for current test + nnoremap te :call CocAction('runCommand', 'jest.singleTest') + + " Init jest in current cwd, require global jest command exists + command! JestInit :call CocAction('runCommand', 'jest.init') + + " use and to navigate completion list + inoremap pumvisible() ? "\" : "\" + inoremap pumvisible() ? "\" : "\" + " } + + " ale { + " Shortcuts jump between linting errors + map [c (ale_previous_wrap) + nmap ]c (ale_next_wrap) + + let g:ale_sign_error = '❌' + let g:ale_sign_warning = '⚠️' + + " Fix files + let g:ale_fixers = {'javascript': ['prettier', 'eslint']} + + " Fix files automatically on save + let g:ale_fix_on_save = 1 " } " } diff --git a/zsh/.zshrc b/zsh/.config/zsh/.zshrc similarity index 75% rename from zsh/.zshrc rename to zsh/.config/zsh/.zshrc index 8880f9c..26c4cba 100644 --- a/zsh/.zshrc +++ b/zsh/.config/zsh/.zshrc @@ -18,6 +18,7 @@ zplug "denysdovhan/spaceship-prompt", use:spaceship.zsh, from:github, as:theme zplug "plugins/docker", from:oh-my-zsh zplug "plugins/docker-compose", from:oh-my-zsh zplug "plugins/extract", from:oh-my-zsh +zplug "plugins/fzf", from:oh-my-zsh zplug "plugins/git", from:oh-my-zsh zplug "plugins/gitignore", from:oh-my-zsh zplug "plugins/ripgrep", from:oh-my-zsh @@ -26,9 +27,13 @@ zplug "plugins/systemd", from:oh-my-zsh zplug "plugins/tmux", from:oh-my-zsh zplug "plugins/vi-mode", from:oh-my-zsh zplug "plugins/sudo", from:oh-my-zsh +zplug "plugins/yarn", from:oh-my-zsh zplug "zsh-users/zsh-autosuggestions", from:github, defer:3 zplug "zsh-users/zsh-syntax-highlighting", from:github, defer:3 +# Let zplug manage itself +zplug 'zplug/zplug', hook-build:'zplug --self-manage' + # Install packages if ! zplug check --verbose; then printf "Install zplug plugins? [y/N]: " @@ -48,13 +53,17 @@ alias sv="sudo nvim" alias ls="exa" alias l="exa -al" -# vifm alias -alias vifm="vifmrun" +# tmux +alias tmux="tmux -f ~/.config/tmux/tmux.conf" -# Refresh gpg-agent tty in case user switches into an X session -gpg-connect-agent updatestartuptty /bye >/dev/null +# git alaises +alias gpoat="git push origin --all && git push origin --tags" +alias gs="git status" +alias gd="git diff" +alias g="git" -source_if_exists ~/.fzf/key-bindings.zsh -source_if_exists ~/.fzf/completion.zsh +# Prevent mv & rm oopsies +alias mv="mv -i" +alias rm="rm -i" neofetch diff --git a/zsh/.zshenv b/zsh/.zshenv index bcd1efe..bf95734 100644 --- a/zsh/.zshenv +++ b/zsh/.zshenv @@ -4,19 +4,189 @@ path_if_exists() { fi } -# Stop tmux bitching about 256 colours -TERM="xterm-256color" - # PATH path_if_exists ~/.config/yarn/global/node_modules/.bin path_if_exists ~/.local/bin path_if_exists ~/.emacs.d/bin - -# Set GPG TTY -export GPG_TTY="$(tty)" +path_if_exists ~/.local/share/go/bin +path_if_exists ~/.local/share/cargo/bin # editor export EDITOR="nvim" +# Rust +export CARGO_HOME=~/.local/share/cargo +export RUSTUP_HOME=~/.local/share/rustup + +# Golang +export GOPATH=~/.local/share/go + +# Enable icons in lf +export LF_ICONS="\ +tw=:\ +st=:\ +ow=:\ +dt=:\ +di=:\ +fi=:\ +ln=:\ +or=:\ +ex=:\ +*.c=:\ +*.cc=:\ +*.clj=:\ +*.coffee=:\ +*.cpp=:\ +*.css=:\ +*.d=:\ +*.dart=:\ +*.erl=:\ +*.exs=:\ +*.fs=:\ +*.go=:\ +*.h=:\ +*.hh=:\ +*.hpp=:\ +*.hs=:\ +*.html=:\ +*.java=:\ +*.jl=:\ +*.js=:\ +*.json=:\ +*.lua=:\ +*.md=:\ +*.php=:\ +*.pl=:\ +*.pro=:\ +*.py=:\ +*.rb=:\ +*.rs=:\ +*.scala=:\ +*.ts=:\ +*.vim=:\ +*.cmd=:\ +*.ps1=:\ +*.sh=:\ +*.bash=:\ +*.zsh=:\ +*.fish=:\ +*.tar=:\ +*.tgz=:\ +*.arc=:\ +*.arj=:\ +*.taz=:\ +*.lha=:\ +*.lz4=:\ +*.lzh=:\ +*.lzma=:\ +*.tlz=:\ +*.txz=:\ +*.tzo=:\ +*.t7z=:\ +*.zip=:\ +*.z=:\ +*.dz=:\ +*.gz=:\ +*.lrz=:\ +*.lz=:\ +*.lzo=:\ +*.xz=:\ +*.zst=:\ +*.tzst=:\ +*.bz2=:\ +*.bz=:\ +*.tbz=:\ +*.tbz2=:\ +*.tz=:\ +*.deb=:\ +*.rpm=:\ +*.jar=:\ +*.war=:\ +*.ear=:\ +*.sar=:\ +*.rar=:\ +*.alz=:\ +*.ace=:\ +*.zoo=:\ +*.cpio=:\ +*.7z=:\ +*.rz=:\ +*.cab=:\ +*.wim=:\ +*.swm=:\ +*.dwm=:\ +*.esd=:\ +*.jpg=:\ +*.jpeg=:\ +*.mjpg=:\ +*.mjpeg=:\ +*.gif=:\ +*.bmp=:\ +*.pbm=:\ +*.pgm=:\ +*.ppm=:\ +*.tga=:\ +*.xbm=:\ +*.xpm=:\ +*.tif=:\ +*.tiff=:\ +*.png=:\ +*.svg=:\ +*.svgz=:\ +*.mng=:\ +*.pcx=:\ +*.mov=:\ +*.mpg=:\ +*.mpeg=:\ +*.m2v=:\ +*.mkv=:\ +*.webm=:\ +*.ogm=:\ +*.mp4=:\ +*.m4v=:\ +*.mp4v=:\ +*.vob=:\ +*.qt=:\ +*.nuv=:\ +*.wmv=:\ +*.asf=:\ +*.rm=:\ +*.rmvb=:\ +*.flc=:\ +*.avi=:\ +*.fli=:\ +*.flv=:\ +*.gl=:\ +*.dl=:\ +*.xcf=:\ +*.xwd=:\ +*.yuv=:\ +*.cgm=:\ +*.emf=:\ +*.ogv=:\ +*.ogx=:\ +*.aac=:\ +*.au=:\ +*.flac=:\ +*.m4a=:\ +*.mid=:\ +*.midi=:\ +*.mka=:\ +*.mp3=:\ +*.mpc=:\ +*.ogg=:\ +*.ra=:\ +*.wav=:\ +*.oga=:\ +*.opus=:\ +*.spx=:\ +*.xspf=:\ +*.pdf=:\ +*.nix=:\ +" + # Save history file in proper place HISTFILE=~/.cache/zsh/history + +# Load config files from their proper place +ZDOTDIR=~/.config/zsh