Merge remote-tracking branch 'origin/theseus'

This commit is contained in:
Barak Michener 2020-11-09 10:53:19 -08:00
commit a267ba0adf
5 changed files with 77 additions and 28 deletions

View file

@ -5,4 +5,4 @@
"coc-snippets": ">=2.2.3",
"coc-ultisnips": ">=1.2.3"
}
}
}

View file

@ -3,6 +3,7 @@
"suggest.enablePreview": true,
"suggest.maxPreviewWidth": 70,
"diagnostic.displayByAle": false,
"diagnostic.checkCurrentLine": true,
"python.linting.pylintEnabled": false,
"python.linting.flake8Enabled": true,
"python.linting.mypyEnabled": true,
@ -21,13 +22,13 @@
"directory": ".ccls-cache"
}
}
},
"golang": {
"command": "gopls",
"rootPatterns": ["go.mod", ".vim/", ".git/", ".hg/"],
"filetypes": ["go"]
}
},
"golang": {
"command": "gopls",
"rootPatterns": ["go.mod", ".vim/", ".git/", ".hg/"],
"filetypes": ["go"]
}
},
"python.autoComplete.extraPaths": [
"${env:SPARK_HOME}/python",
"${env:SPARK_HOME}/python/pyspark"

54
.vimrc
View file

@ -49,7 +49,8 @@ set splitbelow
" For autocomplete, show a menu, show it when there's only one option,
" and only complete the longest common bit instead of the whole thing (like
" bash).
set completeopt=menu,menuone,longest
"set completeopt=menu,menuone,longest
set completeopt=noinsert,menuone,noselect,longest
set diffopt+=vertical
" Some stuff for 256-Color consoles that I've forgotten.
@ -100,18 +101,19 @@ Plug 'let-def/vimbufsync'
Plug 'lambdalisue/suda.vim'
" Plugins that I almost never use
Plug 'vim-scripts/DrawIt'
Plug 'tpope/vim-speeddating'
Plug 'vim-scripts/EasyGrep'
"Plug 'vim-scripts/DrawIt'
"Plug 'tpope/vim-speeddating'
"Plug 'vim-scripts/EasyGrep'
Plug 'chrisbra/NrrwRgn'
Plug 'mattn/calendar-vim'
Plug 'rstacruz/sparkup'
Plug 'tristen/vim-sparkup'
Plug 'tpope/vim-fireplace', {'for': 'clojure'}
"Plug 'terryma/vim-multiple-cursors'
Plug 'ambv/black'
"Plug 'mattn/calendar-vim'
"Plug 'rstacruz/sparkup'
"Plug 'tristen/vim-sparkup'
"Plug 'tpope/vim-fireplace', {'for': 'clojure'}
""Plug 'terryma/vim-multiple-cursors'
"Plug 'ambv/black'
Plug 'kana/vim-textobj-user'
" Plugins I wish I used more
"Plug 'hsitz/VimOrganizer'
Plug 'jceb/vim-orgmode'
@ -130,7 +132,7 @@ Plug 'sjbach/lusty'
Plug 'mhinz/vim-signify'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'junegunn/fzf'
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'junegunn/fzf.vim'
Plug 'bling/vim-bufferline'
Plug 'majutsushi/tagbar'
@ -143,6 +145,8 @@ Plug 'sheerun/vim-polyglot'
Plug 'Shougo/denite.nvim'
Plug 'plytophogy/vim-virtualenv'
Plug 'ervandew/supertab'
"Plug 'ncm2/ncm2'
"Plug 'roxma/nvim-yarp'
" Plugins I NEEDED
@ -200,12 +204,15 @@ Plug 'lervag/vimtex'
" Unclear
Plug 'ncm2/float-preview.nvim'
"Plug 'ncm2/float-preview.nvim'
Plug 'lambdalisue/gina.vim'
Plug 'barakmich/vim-code-dark'
call plug#end()
" enable ncm2 for all buffers
"autocmd BufEnter * call ncm2#enable_for_buffer()
nmap <silent> gd <Plug>(coc-definition)
nmap <silent> gy <Plug>(coc-type-definition)
nmap <silent> gi <Plug>(coc-implementation)
@ -284,12 +291,13 @@ let g:SuperTabDefaultCompletionType = "<c-n>"
" Change the source rank
"call deoplete#custom#option('sources', {
"\ 'python': ['LanguageClient', 'jedi'],
"\ 'python': ['LanguageClient'],
"\ 'cpp': ['LanguageClient'],
"\})
"call deoplete#custom#source('buffer', 'rank', 1)
"let g:deoplete#sources#clang#libclang_path = '/usr/lib/llvm-6.0/lib/libclang.so'
"let g:deoplete#sources#clang#clang_header = '/usr/lib/llvm-6.0/lib/clang'
"let g:deoplete#enable_at_startup = 1
let g:deoplete#enable_at_startup = 1
"let g:deoplete#sources = {}
"let g:deoplete#sources.scala = ['buffer', 'tags', 'omni']
"let g:deoplete#omni#input_patterns = {}
@ -323,15 +331,20 @@ let g:airline#extensions#ale#enabled = 1
let g:ale_set_highlights = 0
" * LanguageServer
"let g:LanguageClient_serverCommands = {
"\ 'python': ['pyls'],
"\ }
let g:LanguageClient_serverCommands = {
\ 'python': ['pyls'],
\ 'cpp': ['ccls'],
\ 'go': ['gopls'],
\ }
let g:LanguageClient_diagnosticsDisplay = {
\1: {'name': 'Error', 'texthl': 'ALEError', 'signText': 'E>', 'signTexthl': 'ALEErrorSign',},
\2: {"name": "Warning", "texthl": "ALEWarning", "signText": "W>", "signTexthl": "ALEWarningSign",},
\3: {"name": "Information", "texthl": "ALEInfo", "signText": "i-", "signTexthl": "ALEInfoSign",},
\4: {"name": "Hint", "texthl": "ALEInfo", "signText": "--", "signTexthl": "ALEInfoSign",},
\}
"nmap <silent> gd <Plug>(lcn-definition)
"nmap <silent> K <Plug>(lcn-hover)
"nmap <silent> <Leader>m <Plug>(lcn-menu)
" * Configure browser for haskell_doc.vim
let g:haddock_browser = "open"
@ -726,7 +739,7 @@ xnoremap <Down> gj
xnoremap <Up> gk
inoremap <Down> <C-o>gj
inoremap <Up> <C-o>gk
nnoremap <C-i> <C-a>
"nnoremap <C-i> <C-a>
" Years of using bash and zsh have caused my fingers to expect these Emacs-like
" mappings to exist. Make them exist in vim as well. But eye them with
" suspicion, as they come from Emacs.
@ -801,14 +814,13 @@ call denite#custom#var('grep', {
nnoremap <silent> <Leader>g :<C-u>Denite -buffer-name=search-buffer grep<CR>
nnoremap <silent> <Leader>aa :<C-u>RipGrep!<CR>
"nnoremap <C-l> :<C-u>Files! `git rev-parse --show-toplevel`<CR>
nnoremap <C-l> :<C-u>GFiles<CR>
nnoremap <C-k> :<C-u>Buffers<CR>
nnoremap <C-k> :<C-u>GFiles<CR>
" For C++ -- A is a great plugin which allows you to jump from the c file to the
" header and vice-versa. Mneumonic here is headerheader.
nnoremap <Leader>hh :A<CR>
" CommandT is useful, but if I'm juggling lots of buffers, limit it to another
" one I have open (instead of standard <Leader>t).
nnoremap <silent> <Leader>o :CtrlPBuffer<CR>
nnoremap <silent> <Leader>o :<C-u>Buffers<CR>
"nnoremap <Leader>j <C-^>
"nnoremap <Leader>p :PTW
nnoremap <Leader>p :LustyJugglePrevious<CR>

4
bin/bazel-in-bear Executable file
View file

@ -0,0 +1,4 @@
#!/bin/sh
LIB=lib/x86_64-linux-gnu
export LD_PRELOAD=$(eval "echo ${LD_PRELOAD}")
bazel --batch "$@" --action_env=LD_PRELOAD=${LD_PRELOAD} --action_env=BEAR_OUTPUT=${BEAR_OUTPUT} --spawn_strategy=local

32
bin/move_bazel_rule.sh Executable file
View file

@ -0,0 +1,32 @@
#!/bin/bash
set -e
if [ -z "$1" ]; then
cat << EOF
Usages:
$0 NEW_BAZEL_FILE
Search for BUILD targets with these names in the git repo
$0 NEW_BAZEL_FILE FIXUP_BAZEL_FILE
Find instances of the BUILD targets in the to-be-fixed-file
$0 NEW_BAZEL_FILE FIXUP_BAZEL_FILE PREFIX
Find instances of that BUILD target with an old prefix (eg: '//:')
$0 NEW_BAZEL_FILE FIXUP_BAZEL_FILE PREFIX NEW_PREFIX
Apply the NEW_PREFIX (eg, a package move) in place of the PREFIX in the FIXUP file.
EOF
exit
fi
INCOMING_SET=$(grep "name" $1 | cut -d '"' -f 2)
TO_CHANGE=$2
PREVIOUS_PATH=$3
NEW_PATH=$4
for TARGET in $INCOMING_SET; do
if [ -n "$TO_CHANGE" ]; then
grep ${PREVIOUS_PATH}${TARGET} $TO_CHANGE
if [ -n "$NEW_PATH" ]; then
sed -i "s^${PREVIOUS_PATH}${TARGET}^${NEW_PATH}${TARGET}^g" $TO_CHANGE
fi
else
git grep ${TARGET}
fi
done