# HG changeset patch # User Steve Losh <steve@stevelosh.com> # Date 1516392366 0 # Node ID 28205343c464b44fd36970d2588a74183ff73299 # Parent f34fe92ef63c33de87d82728e085e00c34ec09ef# Parent 3ab791da67778c481c3759bda40bf6b170006389 Merge. diff -r 3ab791da6777 -r 28205343c464 .hgignore --- a/.hgignore Fri Nov 24 15:05:53 2017 -0500 +++ b/.hgignore Fri Jan 19 20:06:06 2018 +0000 @@ -43,3 +43,5 @@ roswell/compile-parenscript weechat/slack.cache vim/bundle/_wat +vim/bundle/simple-scala +vim/bundle/LanguageClient-neovim diff -r 3ab791da6777 -r 28205343c464 .hgsubstate diff -r 3ab791da6777 -r 28205343c464 fish/config.fish --- a/fish/config.fish Fri Nov 24 15:05:53 2017 -0500 +++ b/fish/config.fish Fri Jan 19 20:06:06 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" ] diff -r 3ab791da6777 -r 28205343c464 gitignore --- a/gitignore Fri Nov 24 15:05:53 2017 -0500 +++ b/gitignore Fri Jan 19 20:06:06 2018 +0000 @@ -6,6 +6,7 @@ *-SCRATCH.* .idea *.iml +*.orig .DS_Store .cache-main .cache-tests diff -r 3ab791da6777 -r 28205343c464 lispwords --- a/lispwords Fri Nov 24 15:05:53 2017 -0500 +++ b/lispwords Fri Jan 19 20:06:06 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) diff -r 3ab791da6777 -r 28205343c464 psqlrc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/psqlrc Fri Jan 19 20:06:06 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 diff -r 3ab791da6777 -r 28205343c464 tmux/tmux.conf --- a/tmux/tmux.conf Fri Nov 24 15:05:53 2017 -0500 +++ b/tmux/tmux.conf Fri Jan 19 20:06:06 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' + diff -r 3ab791da6777 -r 28205343c464 vim/vimrc --- a/vim/vimrc Fri Nov 24 15:05:53 2017 -0500 +++ b/vim/vimrc Fri Jan 19 20:06:06 2018 +0000 @@ -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) @@ -1821,10 +1836,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 " }}} @@ -2242,6 +2264,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) @@ -2254,6 +2290,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! @@ -2727,12 +2765,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() @@ -2915,9 +2958,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) {{{