From 64ddc49d94137790a132d3b96ef73aed1d0a5ad5 Mon Sep 17 00:00:00 2001 From: TomLingham Date: Thu, 20 Feb 2020 22:24:00 +1100 Subject: [PATCH] Updates --- config/nvim/extras/plugins.vim | 12 +++++++----- config/nvim/init.vim | 27 ++++++++++++--------------- dots/.aliases | 4 ++-- dots/.zshrc | 7 ++++++- setup/brew.sh | 1 + setup/rust.sh | 1 + vscode/settings.json | 8 ++++---- 7 files changed, 33 insertions(+), 27 deletions(-) diff --git a/config/nvim/extras/plugins.vim b/config/nvim/extras/plugins.vim index a24dc21..c6e5787 100644 --- a/config/nvim/extras/plugins.vim +++ b/config/nvim/extras/plugins.vim @@ -15,7 +15,7 @@ Plug 'moll/vim-node' Plug 'heavenshell/vim-jsdoc' "----$ TypeScript -Plug 'leafgarland/typescript-vim' +Plug 'HerringtonDarkholme/yats.vim' "----$ ReasonML Plug 'reasonml-editor/vim-reason-plus' @@ -47,7 +47,7 @@ Plug 'tpope/vim-fugitive' "----$ Theme & Style Plug 'morhetz/gruvbox' Plug 'whatyouhide/vim-gotham' -Plug 'TomLingham/dracula.vim' +Plug 'dracula/vim' Plug 'frankier/neovim-colors-solarized-truecolor-only' Plug 'tomasr/molokai' Plug 'vim-airline/vim-airline' @@ -67,7 +67,7 @@ Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } Plug 'junegunn/fzf.vim' Plug 'mileszs/ack.vim' Plug 'w0rp/ale' -"Plug 'ntpeters/vim-better-whitespace' +Plug 'ntpeters/vim-better-whitespace' Plug 'tpope/vim-surround' @@ -99,7 +99,7 @@ nnoremap :call LanguageClient_textDocument_rename() " Remove pipe character between window splits. The whitespace " character after the \ is required! -set fillchars+=vert:\ +set fillchars+=vert:\ " Style JsDocs let g:javascript_plugin_jsdoc=1 @@ -115,7 +115,9 @@ let g:javascript_plugin_flow = 1 " Disable annoying markdown folding let g:vim_markdown_folding_disabled = 1 -let g:vim_markdown_conceal = 0 +set conceallevel=2 +let g:vim_markdown_conceal = 1 +let g:vim_markdown_strikethrough = 1 "============================================================ diff --git a/config/nvim/init.vim b/config/nvim/init.vim index 57b45ac..3815f2b 100644 --- a/config/nvim/init.vim +++ b/config/nvim/init.vim @@ -26,7 +26,6 @@ set backupdir=~/.vim/backup// set directory=~/.vim/swap// set spellfile=~/.vim/spell/en.utf-8.add - " Allow backspace over line breaks, the start of insert and indents set backspace=indent,eol,start @@ -110,14 +109,12 @@ autocmd BufNewFile,BufRead Vagrantfile set filetype=ruby autocmd BufNewFile,BufRead *.md setlocal textwidth=80 autocmd BufNewFile,BufRead *.vue set filetype=html - "============================================================ " Macros "============================================================ let @i = 'Iciwimportf=xifromf df(i f)xI' -let @o = '/## TODO /--- /€kb?^[0-9]\+\. oi' -let @u = 'Go ## o ---kkl' +let @u = 'Go ## o ---kkA' "============================================================ " Leader Key Setup <Space> @@ -128,17 +125,17 @@ nnoremap <SPACE> <Nop> let mapleader="\<Space>" " Leader commands -nmap <leader>; :tabedit $MYVIMRC<CR> -nmap <leader>s :sp<CR> -nmap <leader>v :vsp<CR> -nmap <leader>p :Explore<CR> -nmap <leader>gf :e <cfile><CR> -nmap <leader>' :StripWhitespace<CR> -nmap <silent> <leader><leader> :nohls<CR> -nmap <leader>9 :call <SID>SynStack()<CR> -nmap <leader>d :JsDoc<CR> -nmap <leader>q :TernDef<CR> -nmap <leader>n :e <cfile><cr> +nmap <leader>; :tabedit $MYVIMRC<CR> +nmap <leader>s :sp<CR> +nmap <leader>v :vsp<CR> +nmap <leader>p :Explore<CR> +nmap <leader>gf :e <cfile><CR> +nmap <leader>' :StripWhitespace<CR> +nmap <silent> <leader><leader> :nohls<CR> +nmap <leader>9 :call <SID>SynStack()<CR> +nmap <leader>d :JsDoc<CR> +nmap <leader>q :TernDef<CR> +nmap <leader>n :e <cfile><cr> nmap <leader>t @o; nmap <leader>l @u; diff --git a/dots/.aliases b/dots/.aliases index 3e85e10..b288225 100644 --- a/dots/.aliases +++ b/dots/.aliases @@ -45,6 +45,7 @@ alias aws-docker-login='$(aws ecr get-login --no-include-email --region ap-south alias gita='git add' alias gitaa='git add -A' alias gitb='git rev-parse --abbrev-ref HEAD' +alias gitbls='git branch' alias gitc='git commit -m' alias gitca='git commit --amend' alias gitcane='git commit --amend --no-edit' @@ -130,7 +131,6 @@ yesterday() { DATE=$(date -v -1d +%F) NOTESDIR="$HOME/Notes/$DATE" FILENAME="$NOTESDIR/notes.md" - vim $FILENAME } @@ -153,7 +153,7 @@ notes() { FILENAME="$NOTESDIR/notes.md" if [ ! -f $FILENAME ]; then NICEDATE=$(date "+%A %B %d, %Y") - echo "# Notes for $NICEDATE\n\n---\n\n\n---\n\n## TODO\n\n1. \n\n---" > $FILENAME; + echo "# Notes for $NICEDATE\n\n\n---\n\n## TODO\n\n1. \n\n---" > $FILENAME; fi vim $FILENAME diff --git a/dots/.zshrc b/dots/.zshrc index a71ed7e..e8e13d4 100644 --- a/dots/.zshrc +++ b/dots/.zshrc @@ -11,7 +11,7 @@ export LS_COLORS='di=00;33:ow=01;32:*.js=00;36' export VISUAL=nvim export SOURCE_DIR=$HOME/Source export ZPLUG_HOME=/usr/local/opt/zplug -export RUST_SRC_PATH=$HOME/.multirust/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/src/rust/src/ +export RUST_SRC_PATH="$(rustc --print sysroot)/lib/rustlib/src/rust/src" export HISTFILE=$HOME/.zsh_history export HISTSIZE=500 @@ -56,6 +56,9 @@ export SDKMAN_DIR="$HOME/.sdkman" # FZF [ -s "$HOME/.fzf.zsh" ] && source "$HOME/.fzf.zsh" +# zsh-autosuggest +source /usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh + #============================================ # Path #============================================ @@ -110,3 +113,5 @@ export TMUX_COLOR_HIGHLIGHT_IDLE_FG='#555555' source $HOME/.dotfiles/themes/dracula.sh #source $HOME/.dotfiles/themes/solarized.sh #source $HOME/.dotfiles/themes/molokai.sh + +[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh diff --git a/setup/brew.sh b/setup/brew.sh index 1acf6db..b49b60f 100644 --- a/setup/brew.sh +++ b/setup/brew.sh @@ -24,6 +24,7 @@ packages=( vim zplug zsh + zsh-autosuggestions ) # Casks (Grpahical Applications) diff --git a/setup/rust.sh b/setup/rust.sh index 232d2d8..cbe4486 100644 --- a/setup/rust.sh +++ b/setup/rust.sh @@ -7,6 +7,7 @@ if ! program_exists rustup ; then fi rustup completions zsh > ~/.zfunc/_rustup +rustup component add rls rust-analysis rust-src # Cargo Packages (It should be available now) # cargo install ripgrep diff --git a/vscode/settings.json b/vscode/settings.json index ca0b778..4d261b0 100644 --- a/vscode/settings.json +++ b/vscode/settings.json @@ -1,6 +1,5 @@ { - "http.proxyStrctSSL": false, - "editor.fontFamily": "Menlo, Monaco, 'Courier New', monospace", + "http.proxyStrictSSL": false, "editor.fontSize": 13, "editor.tabSize": 2, "editor.codeLens": false, @@ -89,7 +88,6 @@ "yaml", "yml" ], - "shellformat.flag": "-i 2", "gitlens.mode.active": "zen", "[groovy]": { "editor.tabSize": 4 @@ -135,5 +133,7 @@ ], "terminal.integrated.scrollback": 6000, "cSpell.language": "en-GB", - "vsicons.dontShowNewVersionMessage": true + "vsicons.dontShowNewVersionMessage": true, + "terminal.integrated.shell.osx": "/bin/zsh", + "editor.fontFamily": "'Fira Mono for Powerline', Monaco, 'Courier New', monospace" }