Skip to content

Commit

Permalink
Updated lein profiles, zshrc, vim init
Browse files Browse the repository at this point in the history
  • Loading branch information
dubiousdavid committed Oct 23, 2017
1 parent e38dbf3 commit 73f3c85
Show file tree
Hide file tree
Showing 4 changed files with 103 additions and 63 deletions.
1 change: 1 addition & 0 deletions .gitignore_global
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ Thumbs.db
*.iml
.agignore
.tern-port
.idea
32 changes: 10 additions & 22 deletions .lein/profiles.clj
Original file line number Diff line number Diff line change
@@ -1,32 +1,20 @@
{:user {:plugins [[lein-ancient "0.6.7"]
[lein-ring "0.9.3"]
[lein-midje "3.1.3"]
[com.2tothe8th/lein-expect "0.1.0"]
{:user {:plugins [[lein-ancient "0.6.10"]
[lein-midje "3.2.1"]
[lein-kibit "0.1.5"]
[lein-pprint "1.1.2"]
[lein-kibit "0.0.8"]
#_[cider/cider-nrepl "0.8.2"]
[codox "0.8.12"]
[lein-gorilla "0.3.4"]
[mvxcvi/whidbey "1.0.0"]]
:aliases {"omni" ["do" ["clean"]
["with-profile" "production" "deps" ":tree"]
["ancient"] ["v"] ["kibit"] ["midje"]]}
:signing {:gpg-key "5F5664F2"}
:jvm-opts ["-Dapple.awt.UIElement=true"]
[codox "0.10.3"]
[cider/cider-nrepl "0.15.0"]
[mvxcvi/whidbey "1.3.1"]]
:whidbey {:escape-types '#{datomic.db.DB datomic.btset.BTSet}
:color-scheme {:boolean [:bold :magenta],
:character [:magenta],
:class-delimiter [:magenta],
:class-name [:bold :magenta],
:delimiter [:bold :cyan],
:delimiter [:bold :white],
:function-symbol nil,
:keyword [:bold :blue],
:number [:bold :magenta],
:string [:magenta],
:tag [:bold :magenta]}}
:gorilla-options {:keymap {"command:evaluator:evaluate" "command+e"}}}
:repl {:dependencies [[criterium "0.4.3"]
[com.2tothe8th/example "0.5.0+repl"]]}
:auth {:repository-auth
{#"s3(p)?:\/\/rk-maven" {:username :env/AWS_ACCESS_KEY_ID
:passphrase :env/AWS_SECRET_ACCESS_KEY}}}}
:tag [:bold :magenta]}}}
:repl {:dependencies [[criterium "0.4.4"]
[com.2tothe8th/example "0.5.0+repl"]]}}
12 changes: 9 additions & 3 deletions .zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ export MANPAGER="nvim -c 'set ft=man' -"
# Go
export GOPATH=$PROJ/Go
export PATH=$PATH:$GOPATH/bin:/usr/local/go/bin
# Swift
export PATH=$PATH:/Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin
# FZF
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
export FZF_DEFAULT_COMMAND="ag -f -U --hidden -g ''"
Expand Down Expand Up @@ -106,7 +108,7 @@ rc(){
zsh) v ~/.zshrc ;;
vim) v ~/.config/nvim/init.vim ;;
emacs) e ~/.emacs.d/init.el ;;
clojure) e ~/.lein/profiles.clj ;;
clojure) v ~/.lein/profiles.clj ;;
esac
}

Expand All @@ -129,7 +131,7 @@ build-docs() {
[ $containerId ] && echo "Stopping api-docs ($containerId)" && docker stop $containerId 1>/dev/null
cd "$PROJ/BoomTownROI/api-docs"
docker build -t boomtown/api-docs .
api-docs
start-docs
}

# Start API docs
Expand Down Expand Up @@ -217,7 +219,7 @@ current-branch() {
git rev-parse --abbrev-ref HEAD
}

push-current() {
gup() {
git push -u origin "$(current-branch)"
}

Expand Down Expand Up @@ -248,3 +250,7 @@ serve() {
mongo() {
docker run -d -p 27017:27017 mongo
}

reverse() {
echo $1 | rev
}
121 changes: 83 additions & 38 deletions init.vim
Original file line number Diff line number Diff line change
Expand Up @@ -49,22 +49,19 @@ Plug 'mtth/scratch.vim'
" Formatter
Plug 'sbdchd/neoformat'
" Auto completion
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
" Angular/Typescript
" Plug 'Quramy/vim-js-pretty-template', {'for': 'typescript'}
" Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
" Flow
" Plug 'flowtype/vim-flow'
Plug 'flowtype/vim-flow', {'for': 'javascript'}
" Auto completion for Go
Plug 'nsf/gocode', {'for': 'go', 'rtp': 'nvim', 'do': '~/.config/nvim/plugged/gocode/nvim/symlink.sh'}
" Go integration for deoplete
Plug 'zchee/deoplete-go', {'for': 'go', 'do': 'make'}
" Go syntax highlighting, jump-to-definition, gofmt
Plug 'fatih/vim-go', {'tag': 'v1.6', 'for': 'go'}
Plug 'fatih/vim-go', {'for': 'go'}
" Extend % matching
Plug 'matchit.zip', {'for': ['html', 'xml', 'sh', 'vim']}
" Rust
Plug 'rust-lang/rust.vim', {'for': 'rust'}
" Scala
" Plug 'ensime/ensime-vim', {'for': 'scala', 'do': ':UpdateRemotePlugins'}
Plug 'ensime/ensime-vim', {'for': 'scala', 'commit': '1b32e85f5c1883af3946cf2bf7a39f60801f47b1'}
Plug 'derekwyatt/vim-scala', {'for': ['scala', 'sbt.scala']}
" VCL
Expand All @@ -81,22 +78,34 @@ Plug 'maksimr/vim-jsbeautify', {'for': ['html', 'xml', 'css', 'json']}
Plug 'pangloss/vim-javascript', {'for': 'javascript'}
" JSX
Plug 'mxw/vim-jsx', {'for': 'javascript'}
" Snippets
" Snippets engine
Plug 'SirVer/ultisnips'
Plug 'honza/vim-snippets'
" Actual snippets
" Plug 'honza/vim-snippets'
" Plug 'dubiousdavid/vim-snippets'
Plug '~/Projects/Clojure/vim-snippets'
" Clojure
Plug 'guns/vim-clojure-static', {'for': 'clojure'}
Plug 'tpope/vim-fireplace', {'for': 'clojure'}
Plug 'guns/vim-sexp', {'for': 'clojure'}
" Plug 'guns/vim-clojure-static', {'for': 'clojure'}
Plug 'clojure-vim/async-clj-omni', {'for': 'clojure'}
" Autocompletion
Plug 'roxma/nvim-completion-manager'
" F#
Plug 'scrooloose/syntastic', {'for': 'fsharp'}
Plug 'ervandew/supertab', {'for': 'fsharp'}
Plug 'fsharp/vim-fsharp', {'for': 'fsharp', 'do': 'make fsautocomplete'}
" Plug 'scrooloose/syntastic', {'for': 'fsharp'}
" Plug 'ervandew/supertab', {'for': 'fsharp'}
" Plug 'fsharp/vim-fsharp', {'for': 'fsharp', 'do': 'make fsautocomplete'}
" Elm
Plug 'ElmCast/elm-vim', {'for': 'elm'}
" Plug 'ElmCast/elm-vim', {'for': 'elm'}
" Typescript
Plug 'leafgarland/typescript-vim', {'for': 'typescript'}
Plug 'Quramy/tsuquyomi', {'for': 'typescript', 'do': 'make -f make_mac.mak'}
Plug 'Shougo/vimproc.vim', {'do' : 'make'}
" Plug 'leafgarland/typescript-vim', {'for': 'typescript'}
" Plug 'Quramy/tsuquyomi', {'for': 'typescript', 'do': 'make -f make_mac.mak'}
" Plug 'Shougo/vimproc.vim', {'do' : 'make'}
" Plug 'mhartington/nvim-typescript', {'for': 'typescript'}
" GraphQL
Plug 'jparise/vim-graphql', {'for': 'graphql'}
" Swift
Plug 'apple/swift', {'rtp': 'utils/vim', 'for': 'swift'}
call plug#end()
" Color theme
colorscheme tir_black
Expand Down Expand Up @@ -150,7 +159,7 @@ set splitbelow
set splitright
" <Leader>
let mapleader=','
" let maplocalleader=','
let maplocalleader=','
" Enable edn filetype detection
au BufNewFile,BufRead *.edn setlocal filetype=clojure
" Enable sc filetype detection
Expand All @@ -177,6 +186,9 @@ endif
let g:airline_symbols.readonly='RO'
let g:airline_symbols.linenr = ''
let g:airline_symbols.maxlinenr = ''
" Quickly edit/reload configuration file
" nnoremap gev :e $MYVIMRC<CR>
" nnoremap gsv :so $MYVIMRC<CR>
" Horizontal split
nmap _ :sp<CR>
" Backspace closes buffer
Expand All @@ -187,9 +199,6 @@ map <M-b> :bp!<CR>
map <M-f> :bn!<CR>
" Last buffer
map <C-l> :e#<CR>
" Quickfix
nmap <M-n> :cnext<CR>
nmap <M-p> :cprev<CR>
" Move lines up/down
nmap <C-j> :m +1<CR>
nmap <C-k> :m -2<CR>
Expand All @@ -199,8 +208,6 @@ vmap <C-k> :m '<-2<CR> gv
nmap <Leader>d <Plug>Duplicate
vmap <Leader>d <Plug>Duplicate gv
" Emacs keybindings (insert mode)
imap <C-e> <C-o>$
imap <C-a> <C-o>^
imap <C-f> <Right>
imap <C-b> <Left>
" Stay in visual mode when indenting
Expand Down Expand Up @@ -228,6 +235,33 @@ nmap <Leader>f :Files<CR>
nmap <Leader>b :Buffers<CR>
" Clojure
let g:clojure_syntax_keywords={'clojureDefine': ['defn$','defna','defnv'], 'clojureSpecial': ['fn$','fna','fnv']}
au FileType clojure nmap <buffer> <silent> <Leader>j <Plug>FireplaceDjump
au FileType clojure nmap <buffer> <Leader>k :Require<CR>
let g:sexp_insert_after_wrap=0
let g:sexp_mappings = {
\ 'sexp_round_head_wrap_list': '',
\ 'sexp_round_tail_wrap_list': '',
\ 'sexp_square_head_wrap_list': '',
\ 'sexp_square_tail_wrap_list': '',
\ 'sexp_curly_head_wrap_list': '',
\ 'sexp_curly_tail_wrap_list': '',
\ 'sexp_round_head_wrap_element': '<LocalLeader>(',
\ 'sexp_round_tail_wrap_element': '<LocalLeader>)',
\ 'sexp_square_head_wrap_element': '<LocalLeader>[',
\ 'sexp_square_tail_wrap_element': '<LocalLeader>]',
\ 'sexp_curly_head_wrap_element': '<LocalLeader>{',
\ 'sexp_curly_tail_wrap_element': '<LocalLeader>}',
\ 'sexp_insert_at_list_head': '',
\ 'sexp_insert_at_list_tail': '',
\ 'sexp_splice_list': '<LocalLeader>@',
\ 'sexp_convolute': '<LocalLeader>?',
\ 'sexp_raise_list': '',
\ 'sexp_raise_element': '<LocalLeader>^',
\ 'sexp_move_to_prev_element_head': '{',
\ 'sexp_move_to_next_element_head': '}',
\ 'sexp_swap_list_backward': '',
\ 'sexp_swap_list_forward': '',
\ }
" Ag
function! s:Ag(term)
execute 'te ag --pager=less ' . a:term
Expand Down Expand Up @@ -263,19 +297,23 @@ au FileType scala nmap <buffer> <silent> <Leader>T :EnTypeCheck<CR>
au FileType scala nmap <buffer> <silent> <Leader>i :EnInspectType<CR>
au FileType scala nmap <buffer> <silent> <Leader>l :EnDocBrowse<CR>
au FileType scala nmap <buffer> <silent> <Leader>x :EnRename<CR>
" au BufWritePost *.scala silent :EnTypeCheck
" Deoplete
let g:deoplete#enable_at_startup=1
let g:deoplete#sources = {}
" let g:deoplete#sources.scala = ['buffer', 'tags', 'omni']
let g:deoplete#sources.scala = ['tags', 'omni']
let g:deoplete#omni#input_patterns = {}
" let g:deoplete#omni#input_patterns.scala = ['[^. *\t0-9]\.\w*',': [A-Z]\w', '[\[\t\( ][A-Za-z]\w*']
" Go
au FileType go nmap <buffer> <silent> <Leader>j <Plug>(go-def)
au FileType go nmap <buffer> <silent> <Leader>t <Plug>(go-info)
au FileType go nmap <buffer> <silent> <Leader>l <Plug>(go-doc)
au FileType go nmap <buffer> <silent> <Leader>x <Plug>(go-rename)
let g:go_highlight_build_constraints = 1
let g:go_highlight_extra_types = 1
let g:go_highlight_fields = 1
let g:go_highlight_functions = 1
let g:go_highlight_methods = 1
let g:go_highlight_operators = 1
let g:go_highlight_structs = 1
let g:go_highlight_types = 1
let g:go_auto_type_info = 1
" Javascript
au FileType javascript nmap <buffer> <silent> <Leader>j :FlowJumpToDef<CR>
au FileType javascript nmap <buffer> <silent> <Leader>t :FlowType<CR>
" Typescript
au FileType typescript nmap <buffer> <silent> <Leader>j :TsuDefinition<CR>
au FileType typescript nmap <buffer> <silent> <Leader>i :TsuImport<CR>
Expand All @@ -301,11 +339,11 @@ nmap <Leader>r :Startify<CR>
let g:startify_list_order = ['dir', 'files', 'bookmarks', 'sessions', 'commands']
let g:startify_change_to_dir = 0
let g:startify_custom_header = []
" Make directory
command MakeDirectory :silent !mkdir -p %:h
" Snippets
let g:UltiSnipsJumpBackwardTrigger="<C-z>"
let g:UltiSnipsJumpForwardTrigger="<C-q>"
let g:UltiSnipsJumpBackwardTrigger="<C-h>"
let g:UltiSnipsJumpForwardTrigger="<C-l>"
let g:UltiSnipsSnippetsDir="~/.vim/custom-snippets/UltiSnips"
nmap <leader>ue :UltiSnipsEdit<CR>
" Wrap lines in Quickfix
augroup quickfix
autocmd!
Expand All @@ -317,12 +355,19 @@ nmap <leader>si <plug>(scratch-insert-reuse)
xmap <leader>si <plug>(scratch-selection-reuse)
nmap <leader>sp :ScratchPreview<CR>
nmap <leader>se :Scratch<CR>
" Angular
" autocmd FileType typescript JsPreTmpl html
" autocmd FileType typescript syn clear foldBraces
" Javascript
let g:javascript_plugin_jsdoc=1
autocmd FileType javascript.jsx,javascript setlocal formatprg=prettier\ --stdin\ --print-width\ 100\ --single-quote
autocmd BufWritePre *.js Neoformat
let g:neoformat_javascript_prettier = {
\ 'exe': 'prettier', 'args': ['--stdin', '--single-quote', '--print-width 100'], 'stdin': 1 }
" Flow
let g:flow#autoclose=1
" Use locally installed flow
let local_flow = finddir('node_modules', '.;') . '/.bin/flow'
if matchstr(local_flow, "^\/\\w") == ''
let local_flow= getcwd() . "/" . local_flow
endif
if executable(local_flow)
let g:flow#flowpath = local_flow
endif

0 comments on commit 73f3c85

Please sign in to comment.