9469fc3d271f

Merge.
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Sat, 20 Jan 2018 15:38:38 -0500
parents 3277da5053a6 (current diff) 28205343c464 (diff)
children 665fffea183b
branches/tags (none)
files .hgignore lispwords vim/vimrc

Changes

--- a/.hgignore	Sat Jan 20 15:38:14 2018 -0500
+++ b/.hgignore	Sat Jan 20 15:38:38 2018 -0500
@@ -43,5 +43,4 @@
 roswell/compile-parenscript
 weechat/slack.cache
 vim/bundle/_wat
-
-mutt/*.cert
+=======
--- a/fish/config.fish	Sat Jan 20 15:38:14 2018 -0500
+++ b/fish/config.fish	Sat Jan 20 15:38:38 2018 -0500
@@ -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	Sat Jan 20 15:38:14 2018 -0500
+++ b/gitignore	Sat Jan 20 15:38:38 2018 -0500
@@ -6,6 +6,7 @@
 *-SCRATCH.*
 .idea
 *.iml
+*.orig
 .DS_Store
 .cache-main
 .cache-tests
--- a/lispwords	Sat Jan 20 15:38:14 2018 -0500
+++ b/lispwords	Sat Jan 20 15:38:38 2018 -0500
@@ -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	Sat Jan 20 15:38:38 2018 -0500
@@ -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	Sat Jan 20 15:38:14 2018 -0500
+++ b/tmux/tmux.conf	Sat Jan 20 15:38:38 2018 -0500
@@ -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	Sat Jan 20 15:38:14 2018 -0500
+++ b/vim/vimrc	Sat Jan 20 15:38:38 2018 -0500
@@ -302,8 +302,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)
@@ -1824,10 +1839,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
 
 " }}}
@@ -2245,6 +2267,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)
@@ -2257,6 +2293,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!
@@ -2730,12 +2768,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()
@@ -2918,9 +2961,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) {{{