f34fe92ef63c

Commit waiting stuff
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Fri, 19 Jan 2018 20:05:03 +0000
parents 2df1499f1f78
children 28205343c464
branches/tags (none)
files .hgsubstate fish/config.fish gitignore lispwords psqlrc tmux/tmux.conf vim/vimrc

Changes

--- a/.hgsubstate	Fri Jan 19 20:02:27 2018 +0000
+++ b/.hgsubstate	Fri Jan 19 20:05:03 2018 +0000
@@ -1,4 +1,4 @@
-5334581e231a5167d03689ff47b3a6fdf082011c mercurial/hg-prompt
+dc481ce24b602720746967f40a93b65c45cdd0f8 mercurial/hg-prompt
 1fc4a9fbead7e0acc4c828b346f3be2658ec3df9 mercurial/templates
 b6a8b49e2173ba5a1b34d00e68e0ed8addac3ebd vim/bundle/abolish
 a16a9b63eb85cc0960a7f25c54647ac1f99f3360 vim/bundle/ack
@@ -40,5 +40,5 @@
 f6f2d6618a321f5b0065586a7bc934325fec81ab vim/bundle/targets
 5d5c71044880443035e07009497962feacb56b20 vim/bundle/vimtex
 bf3fd7f67e730f93765bd3c1cfcdb18fd4043521 vim/bundle/vitality
-faff23c03a5a1f28d6ef5963e6a9caa46af7074a vim/bundle/vlime
+065b95f3ac7a455314c2bdefeb2b792f290034df vim/bundle/vlime
 6876fe38b33732cb124d415ffc4156f16da5e118 vim/bundle/windowswap
--- a/fish/config.fish	Fri Jan 19 20:02:27 2018 +0000
+++ b/fish/config.fish	Fri Jan 19 20:05:03 2018 +0000
@@ -70,6 +70,7 @@
 prepend_to_path "/usr/bin"
 prepend_to_path "/usr/local/bin"
 prepend_to_path "/usr/local/sbin"
+prepend_to_path "/usr/local/MacGPG2/bin"
 prepend_to_path "$HOME/lib/dotfiles/roswell"
 prepend_to_path "$HOME/lib/dotfiles/bin"
 prepend_to_path "$HOME/lib/hg/hg"
@@ -83,6 +84,8 @@
 set -g -x RUBYOPT rubygems
 set -g -x CLASSPATH "$CLASSPATH:/usr/local/Cellar/clojure-contrib/1.2.0/clojure-contrib.jar"
 
+set -g -x PAGER 'less -X'
+
 set -g -x NODE_PATH "/usr/local/lib/node_modules"
 
 set -g -x VIM_BINARY "/usr/local/bin/vim"
@@ -91,7 +94,7 @@
 set -g -x DRIP_SHUTDOWN 30
 
 set -g -x MAVEN_OPTS "-Xmx2048m -Xss2M -XX:ReservedCodeCacheSize=128m"
-set -g -x _JAVA_OPTIONS "-Djava.awt.headless=true"
+# set -g -x _JAVA_OPTIONS "-Djava.awt.headless=true"
 
 set -g -x GPG_TTY (tty)
 
@@ -149,9 +152,13 @@
 set magenta (set_color magenta)
 set yellow (set_color yellow)
 set green (set_color green)
+set cyan (set_color cyan)
 set gray (set_color -o black)
-set hg_promptstring "< on $magenta<branch>$normal>< at $yellow<tags|$normal, $yellow>$normal>$green<status|modified|unknown><update>$normal<
-patches: <patches|join( → )|pre_applied($yellow)|post_applied($normal)|pre_unapplied($gray)|post_unapplied($normal)>>" 2>/dev/null
+set hg_promptstring "\
+< on $magenta<branch>$normal>\
+< at $cyan<bookmark>$normal>\
+$green<status|modified|unknown><update>$normal\
+" 2>/dev/null
 
 function virtualenv_prompt
     if [ -n "$VIRTUAL_ENV" ]
--- a/gitignore	Fri Jan 19 20:02:27 2018 +0000
+++ b/gitignore	Fri Jan 19 20:05:03 2018 +0000
@@ -6,6 +6,7 @@
 *-SCRATCH.*
 .idea
 *.iml
+*.orig
 .DS_Store
 .cache-main
 .cache-tests
--- a/lispwords	Fri Jan 19 20:02:27 2018 +0000
+++ b/lispwords	Fri Jan 19 20:05:03 2018 +0000
@@ -76,7 +76,9 @@
 ; cl-losh
 (1 recursively)
 (1 when-found if-found)
-(1 when-let*)
+(1 when-let* when-let)
+(1 if-let* if-let)
+(1 gathering-vector)
 (1 multiple-value-bind*)
 (1 do-repeat)
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/psqlrc	Fri Jan 19 20:05:03 2018 +0000
@@ -0,0 +1,9 @@
+\set ON_ERROR_ROLLBACK interactive
+\set COMP_KEYWORD_CASE upper
+\set HISTFILE ~/.psql/history- :DBNAME
+
+\pset pager on
+\pset null '∅'
+
+\set PROMPT1 '%[%033[1;34m%]%M:%> %n@%/%R%#%x%[%033[0m%] '
+\timing
--- a/tmux/tmux.conf	Fri Jan 19 20:02:27 2018 +0000
+++ b/tmux/tmux.conf	Fri Jan 19 20:05:03 2018 +0000
@@ -18,8 +18,8 @@
 
 # This is hilariously absurd.  How many nerds use tmux on OS X every day and
 # it's still fundamentally broken?
-set -g default-command "reattach-to-user-namespace -l zsh"
-set -g default-command "reattach-to-user-namespace -l fish"
+# set -g default-command "reattach-to-user-namespace -l zsh"
+# set -g default-command "reattach-to-user-namespace -l fish"
 
 # Less stretching to get to the first item.
 set -g base-index 1
@@ -68,6 +68,7 @@
 bind-key -r H swap-window -t -1
 bind-key -r L swap-window -t +1
 bind m command-prompt "move-window -t %%"
+bind - choose-tree
 
 # 256 colors please
 set -g default-terminal "screen-256color"
@@ -101,7 +102,7 @@
 set -g visual-activity off
 
 # Autorename sanely.
-setw -g automatic-rename on
+# setw -g automatic-rename on
 
 # Better name management
 bind c new-window -a
@@ -128,3 +129,4 @@
 
 # Let neovim change the cursor shape
 set -g -a terminal-overrides ',*:Ss=\E[%p1%d q:Se=\E[2 q'
+
--- a/vim/vimrc	Fri Jan 19 20:02:27 2018 +0000
+++ b/vim/vimrc	Fri Jan 19 20:05:03 2018 +0000
@@ -301,8 +301,8 @@
 nnoremap <leader>n :setlocal number!<cr>
 
 " Sort lines
-nnoremap <leader>s vip:!sort -f<cr>
-vnoremap <leader>s :!sort -f<cr>
+nnoremap <leader>s vip:sort<cr>
+vnoremap <leader>s :sort<cr>
 
 " Tabs
 nnoremap <leader>( :tabprev<cr>
@@ -667,7 +667,7 @@
 set hlsearch
 set gdefault
 
-set scrolloff=3
+set scrolloff=5
 set sidescroll=1
 set sidescrolloff=10
 
@@ -697,16 +697,25 @@
 " screen.  Both will pulse the cursor line so you can see where the hell you
 " are.  <c-\> will also fold everything in the buffer and then unfold just
 " enough for you to see the destination line.
-function! JumpToTag()
-    execute "normal! \<c-]>mzzvzz15\<c-e>"
-    execute "keepjumps normal! `z"
+"
+function! JumpTo(jumpcommand)
+    execute a:jumpcommand
+    call FocusLine()
     Pulse
 endfunction
-function! JumpToTagInSplit()
-    execute "normal! \<c-w>v\<c-]>mzzMzvzz15\<c-e>"
-    execute "keepjumps normal! `z"
+function! JumpToInSplit(jumpcommand)
+    execute "normal! \<c-w>v"
+    execute a:jumpcommand
     Pulse
 endfunction
+
+function! JumpToTag()
+    call JumpTo("normal! \<c-]>")
+endfunction
+function! JumpToTagInSplit()
+    call JumpToInSplit("normal! \<c-]>")
+endfunction
+
 nnoremap <c-]> :silent! call JumpToTag()<cr>
 nnoremap <c-\> :silent! call JumpToTagInSplit()<cr>
 
@@ -796,13 +805,19 @@
 "
 " 1. Close all folds.
 " 2. Open just the folds containing the current line.
-" 3. Move the line to a little bit (15 lines) above the center of the screen.
+" 3. Move the line to a bit (25 lines) down from the top of the screen.
 " 4. Pulse the cursor line.  My eyes are bad.
 "
 " This mapping wipes out the z mark, which I never use.
 "
 " I use :sus for the rare times I want to actually background Vim.
-nnoremap <c-z> mzzMzvzz15<c-e>`z:Pulse<cr>
+function! FocusLine()
+    let oldscrolloff = &scrolloff
+    set scrolloff=0
+    execute "keepjumps normal! mzzMzvzt25\<c-y>`z:Pulse\<cr>"
+    let &scrolloff = oldscrolloff
+endfunction
+nnoremap <c-z> :call FocusLine()<cr>
 
 function! MyFoldText() " {{{
     let line = getline(v:foldstart)
@@ -1809,10 +1824,17 @@
 augroup ft_scala
     au!
 
-    au FileType scala setlocal foldmethod=marker
-    au FileType scala setlocal foldmarker={,}
+    au FileType scala setlocal foldmethod=syntax
+    au FileType scala setlocal foldlevel=1
     au FileType scala setlocal cc=100 tw=100
     au FileType scala setlocal expandtab
+
+    au FileType scala nnoremap <buffer> <leader>s :SortSimpleScalaImports<cr>
+    au FileType scala nnoremap <buffer> <c-]> :call LanguageClient_textDocument_definition()<CR>
+    au FileType scala nnoremap <buffer> <localleader>r :call LanguageClient_textDocument_references()<CR>
+    au FileType scala inoremap <buffer> <c-n> <c-x><c-o>
+
+    au FileType scala setlocal omnifunc=LanguageClient#complete
 augroup END
 
 " }}}
@@ -2230,6 +2252,20 @@
 let g:atia_attributes_complete = 0
 
 " }}}
+" Language Server Protocol {{{
+
+let g:LanguageClient_serverCommands = {
+    \ 'scala': ['netcat', 'localhost', '62831'],
+    \ 'java': ['netcat', 'localhost', '62831'],
+    \ }
+let g:LanguageClient_autoStart = 1
+
+nnoremap <silent> gd :call LanguageClient_textDocument_definition()<CR>
+
+" nnoremap <silent> K :call LanguageClient_textDocument_hover()<CR>
+" nnoremap <silent> <F2> :call LanguageClient_textDocument_rename()<CR>
+
+" }}}
 " MiniYank {{{
 
 map p <Plug>(miniyank-autoput)
@@ -2242,6 +2278,8 @@
 
 noremap  <F2> :NERDTreeToggle<cr>
 inoremap <F2> <esc>:NERDTreeToggle<cr>
+noremap  <S-F2> :NERDTreeFind<cr>
+inoremap <S-F2> <esc>:NERDTreeFind<cr>
 
 augroup ps_nerdtree
     au!
@@ -2714,12 +2752,17 @@
     au FileType lisp nnoremap <buffer> <localleader>f :call vlime#plugin#CompileFile(expand("%:p"))<cr>
     au FileType lisp nnoremap <buffer> <localleader>S :call vlime#plugin#SendToREPL(vlime#ui#CurTopExpr())<cr>
     au FileType lisp nnoremap <buffer> <localleader>i :call vlime#plugin#Inspect(vlime#ui#CurExprOrAtom())<cr>
+    au FileType lisp nnoremap <buffer> <nowait> <localleader>I :call vlime#plugin#Inspect()<cr>
     au FileType lisp nnoremap <buffer> M :call vlime#plugin#DocumentationSymbol(vlime#ui#CurAtom())<cr>
     au FileType lisp setlocal indentexpr=vlime#plugin#CalcCurIndent()
     au FileType lisp nnoremap <buffer> gi :call IndentToplevelLispForm()<cr>
 
     " Keys for the REPL
     au FileType vlime_repl      nnoremap <buffer> i :call vlime#ui#repl#InspectCurREPLPresentation()<cr>
+    au FileType vlime_repl      nnoremap <buffer> <2-LeftMouse> :call vlime#ui#repl#InspectCurREPLPresentation()<cr>
+
+    " Keys for the Inspector
+    au FileType vlime_inspector nnoremap <buffer> <2-LeftMouse> :call vlime#ui#inspector#InspectorSelect()<cr>
 
     " Universal keys, for all kinds of Vlime windows
     au FileType lisp,vlime_repl,vlime_inspector,vlime_sldb,vlime_notes,vlime_xref,vlime_preview call MapVlimeKeys()
@@ -2902,9 +2945,9 @@
   endif
 endfunction " }}}
 
-nmap <silent> <f3> :ErrorsToggle<cr>
+" nmap <silent> <f3> :ErrorsToggle<cr>
 nmap <silent> <f4> :QFixToggle<cr>
-" nmap <silent> <f3> :LocationToggle<cr>
+nmap <silent> <f3> :LocationToggle<cr>
 
 " }}}
 " Hg (Mercurial) {{{