holiday tinkering
This commit is contained in:
parent
2ec3b75102
commit
3b056348ae
11 changed files with 243 additions and 196 deletions
|
@ -1,5 +1,5 @@
|
||||||
Xft.dpi: 240
|
!Xft.dpi: 210
|
||||||
!Xft.dpi: 96
|
Xft.dpi: 144
|
||||||
Xft.antialias: 1
|
Xft.antialias: 1
|
||||||
Xft.rgba: rgb
|
Xft.rgba: rgb
|
||||||
Xft.hinting: 1
|
Xft.hinting: 1
|
||||||
|
|
2
.bashrc
2
.bashrc
|
@ -112,3 +112,5 @@ fi
|
||||||
source $HOME/.bash_aliases
|
source $HOME/.bash_aliases
|
||||||
source $HOME/.bash_exports
|
source $HOME/.bash_exports
|
||||||
source $HOME/.bash_prompt
|
source $HOME/.bash_prompt
|
||||||
|
|
||||||
|
[ -f ~/.fzf.bash ] && source ~/.fzf.bash
|
||||||
|
|
9
.config/nvim/coc-settings.json
Normal file
9
.config/nvim/coc-settings.json
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
"languageserver": {
|
||||||
|
"golang": {
|
||||||
|
"command": "bingo",
|
||||||
|
"rootPatterns": ["go.mod", ".vim/", ".git/", ".hg/"],
|
||||||
|
"filetypes": ["go"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -298,11 +298,13 @@ endfun
|
||||||
call <sid>hi("Visual", s:cyan_a100, s:blue_900, "")
|
call <sid>hi("Visual", s:cyan_a100, s:blue_900, "")
|
||||||
call <sid>hi("Folded", s:purple_100, s:purple_900, "")
|
call <sid>hi("Folded", s:purple_100, s:purple_900, "")
|
||||||
call <sid>hi("NonText", s:grey_800, "", "")
|
call <sid>hi("NonText", s:grey_800, "", "")
|
||||||
call <sid>hi("Bookmark", s:black_1000, s:lime_200, "none")
|
call <sid>hi("Bookmark", s:black_1000, s:yellow_300, "none")
|
||||||
call <sid>hi("Todo", s:yellow_a100, s:yellow_900, "none")
|
call <sid>hi("Todo", s:yellow_a100, s:yellow_900, "none")
|
||||||
call <sid>hi("SignColumn", s:blue_grey_100, s:blue_grey_900, "")
|
call <sid>hi("SignColumn", s:blue_grey_100, s:black_1000, "")
|
||||||
call <sid>hi("VertSplit", s:blue_grey_800, s:blue_grey_300, "")
|
call <sid>hi("VertSplit", s:blue_grey_800, s:blue_grey_300, "")
|
||||||
call <sid>hi("LineNr", s:blue_grey_700, s:black_1000, "italic")
|
call <sid>hi("LineNr", s:blue_grey_700, s:black_1000, "italic")
|
||||||
|
call <sid>hi("CursorLine", "", "#171717", "")
|
||||||
|
call <sid>hi("CursorLineNR", s:blue_grey_200, s:blue_grey_900, "")
|
||||||
call <sid>hi("Normal", s:white_1000, "", "")
|
call <sid>hi("Normal", s:white_1000, "", "")
|
||||||
call <sid>hi("Bold", "", "", "bold")
|
call <sid>hi("Bold", "", "", "bold")
|
||||||
call <sid>hi("Italic", "", "", "italic")
|
call <sid>hi("Italic", "", "", "italic")
|
||||||
|
@ -341,5 +343,10 @@ call <sid>hi("goDeclaration", s:deep_purple_200, "", "none")
|
||||||
call <sid>hi("goReceiverType", s:cyan_200, "", "none")
|
call <sid>hi("goReceiverType", s:cyan_200, "", "none")
|
||||||
call <sid>hi("goMethodCall", s:brown_100, "", "none")
|
call <sid>hi("goMethodCall", s:brown_100, "", "none")
|
||||||
call <sid>hi("goField", s:cyan_50, "", "none")
|
call <sid>hi("goField", s:cyan_50, "", "none")
|
||||||
call <sid>hi("goFunctionCall", s:brown_200, "", "none")
|
call <sid>hi("goFunctionCall", s:blue_grey_200, "", "none")
|
||||||
call <sid>hi("goSameId", s:lime_a400, "", "italic")
|
call <sid>hi("goSameId", s:lime_a400, "", "italic")
|
||||||
|
call <sid>hi("GitGutterAdd", s:light_green_500, "", "")
|
||||||
|
call <sid>hi("GitGutterChange",s:light_blue_300, "", "")
|
||||||
|
call <sid>hi("GitGutterDelete",s:yellow_300, "", "")
|
||||||
|
call <sid>hi("ALEErrorSign",s:black_1000, s:red_400, "none")
|
||||||
|
call <sid>hi("ALEWarningSign",s:orange_200, "", "none")
|
||||||
|
|
|
@ -2,56 +2,83 @@
|
||||||
" set rtp+=~/.vim/bundle/Vundle.vim
|
" set rtp+=~/.vim/bundle/Vundle.vim
|
||||||
call plug#begin('~/.local/share/nvim/plugged')
|
call plug#begin('~/.local/share/nvim/plugged')
|
||||||
|
|
||||||
" Plugins
|
" Autocomplete
|
||||||
Plug 'VundleVim/Vundle.vim'
|
" Plug 'ncm2/ncm2'
|
||||||
Plug 'acarapetis/vim-colors-github'
|
" Plug 'roxma/nvim-yarp'
|
||||||
Plug 'airblade/vim-gitgutter'
|
" Plug 'ncm2/ncm2-bufword'
|
||||||
Plug 'b4b4r07/vim-hcl'
|
" Plug 'ncm2/ncm2-tmux'
|
||||||
Plug 'bazelbuild/vim-bazel'
|
" Plug 'ncm2/ncm2-path'
|
||||||
Plug 'cespare/vim-toml'
|
" Plug 'ncm2/ncm2-go'
|
||||||
Plug 'djoshea/vim-autoread'
|
" Plug 'ncm2/ncm2-racer'
|
||||||
Plug 'ervandew/supertab'
|
Plug 'neoclide/coc.nvim', {'tag': '*', 'do': { -> coc#util#install()}}
|
||||||
|
|
||||||
|
" Plugin outside ~/.vim/plugged with post-update hook
|
||||||
|
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
|
||||||
|
Plug 'junegunn/fzf.vim'
|
||||||
|
|
||||||
|
" Markdown
|
||||||
|
Plug 'jtratner/vim-flavored-markdown'
|
||||||
|
Plug 'tpope/vim-markdown'
|
||||||
|
|
||||||
|
" remove trailing whitespace
|
||||||
|
Plug 'bronson/vim-trailing-whitespace'
|
||||||
|
|
||||||
|
" comment lines out (gc in visual mode)
|
||||||
|
Plug 'tomtom/tcomment_vim'
|
||||||
|
|
||||||
|
" Pimped out bar at the bottom of current buffer
|
||||||
|
Plug 'vim-airline/vim-airline'
|
||||||
|
Plug 'vim-airline/vim-airline-themes'
|
||||||
|
|
||||||
|
" Golang
|
||||||
Plug 'fatih/vim-go'
|
Plug 'fatih/vim-go'
|
||||||
Plug 'gerw/vim-HiLinkTrace'
|
Plug 'mdempsky/gocode'
|
||||||
Plug 'godlygeek/tabular'
|
|
||||||
Plug 'google/vim-jsonnet'
|
" Bazel
|
||||||
Plug 'google/vim-maktaba'
|
Plug 'bazelbuild/vim-bazel'
|
||||||
|
Plug 'bazelbuild/vim-ft-bzl'
|
||||||
|
|
||||||
|
" Rust
|
||||||
|
Plug 'racer-rust/vim-racer'
|
||||||
|
Plug 'roxma/nvim-cm-racer'
|
||||||
|
Plug 'rust-lang/rust.vim'
|
||||||
|
|
||||||
|
" Terraform
|
||||||
|
Plug 'b4b4r07/vim-hcl'
|
||||||
Plug 'hashivim/vim-terraform'
|
Plug 'hashivim/vim-terraform'
|
||||||
|
|
||||||
|
" Jsonnet filetype plugin
|
||||||
|
Plug 'google/vim-jsonnet'
|
||||||
|
|
||||||
|
" toml
|
||||||
|
Plug 'cespare/vim-toml'
|
||||||
|
|
||||||
|
" Plug 'ervandew/supertab'
|
||||||
|
Plug 'google/vim-maktaba'
|
||||||
Plug 'jremmen/vim-ripgrep'
|
Plug 'jremmen/vim-ripgrep'
|
||||||
Plug 'junegunn/vim-easy-align'
|
Plug 'junegunn/vim-easy-align'
|
||||||
Plug 'junegunn/fzf'
|
|
||||||
Plug 'junegunn/fzf.vim'
|
|
||||||
Plug 'junegunn/goyo.vim'
|
Plug 'junegunn/goyo.vim'
|
||||||
Plug 'junegunn/gv.vim'
|
|
||||||
Plug 'junegunn/vim-peekaboo'
|
Plug 'junegunn/vim-peekaboo'
|
||||||
Plug 'kshenoy/vim-signature'
|
Plug 'kshenoy/vim-signature'
|
||||||
Plug 'Matt-Deacalion/vim-systemd-syntax'
|
Plug 'Matt-Deacalion/vim-systemd-syntax'
|
||||||
Plug 'NLKNguyen/papercolor-theme'
|
Plug 'NLKNguyen/papercolor-theme'
|
||||||
Plug 'plasticboy/vim-markdown'
|
|
||||||
Plug 'rakr/vim-one'
|
|
||||||
Plug 'rust-lang/rust.vim'
|
|
||||||
Plug 'sebdah/vim-delve'
|
|
||||||
Plug 'Shougo/neosnippet.vim'
|
Plug 'Shougo/neosnippet.vim'
|
||||||
Plug 'Shougo/neosnippet-snippets'
|
Plug 'Shougo/neosnippet-snippets'
|
||||||
Plug 'tomtom/tcomment_vim'
|
" Plug 'vim-syntastic/syntastic'
|
||||||
Plug 'tpope/vim-fugitive'
|
|
||||||
Plug 'tyrannicaltoucan/vim-quantum'
|
|
||||||
Plug 'vim-airline/vim-airline'
|
|
||||||
Plug 'vim-airline/vim-airline-themes'
|
|
||||||
Plug 'vim-syntastic/syntastic'
|
|
||||||
Plug 'w0rp/ale'
|
Plug 'w0rp/ale'
|
||||||
|
|
||||||
" Autocomplete
|
|
||||||
Plug 'ncm2/ncm2'
|
" Git
|
||||||
Plug 'roxma/nvim-yarp'
|
Plug 'airblade/vim-gitgutter'
|
||||||
Plug 'ncm2/ncm2-bufword'
|
Plug 'tpope/vim-fugitive'
|
||||||
Plug 'ncm2/ncm2-tmux'
|
Plug 'junegunn/gv.vim'
|
||||||
Plug 'ncm2/ncm2-path'
|
|
||||||
Plug 'ncm2/ncm2-go'
|
|
||||||
Plug 'ncm2/ncm2-racer'
|
|
||||||
|
|
||||||
call plug#end()
|
call plug#end()
|
||||||
|
|
||||||
|
" language en_US
|
||||||
|
set encoding=utf8
|
||||||
|
set ffs=unix,dos,mac
|
||||||
|
|
||||||
set ttimeout
|
set ttimeout
|
||||||
set ttimeoutlen=0
|
set ttimeoutlen=0
|
||||||
" set timeoutlen=150
|
" set timeoutlen=150
|
||||||
|
@ -77,6 +104,7 @@ set smartindent " Don't mess with comments
|
||||||
set nojoinspaces
|
set nojoinspaces
|
||||||
|
|
||||||
set autochdir
|
set autochdir
|
||||||
|
set autoread "Reload files changed outside vim
|
||||||
set nofoldenable " disable folding
|
set nofoldenable " disable folding
|
||||||
|
|
||||||
" Wordwrap
|
" Wordwrap
|
||||||
|
@ -98,9 +126,11 @@ set whichwrap+=<,>,h,l
|
||||||
set wrap
|
set wrap
|
||||||
|
|
||||||
"" GUI
|
"" GUI
|
||||||
set novisualbell
|
set visualbell
|
||||||
set noerrorbells
|
set noerrorbells
|
||||||
set ruler
|
set ruler
|
||||||
|
set cursorline
|
||||||
|
set guicursor=n-v-c:block,i-ci-ve:ver25,r-cr:hor20,o:hor50
|
||||||
set number " line numbers
|
set number " line numbers
|
||||||
set numberwidth=6
|
set numberwidth=6
|
||||||
set lz " lazy redraw
|
set lz " lazy redraw
|
||||||
|
@ -118,7 +148,7 @@ set wildignore=*.swp,*.bak,*.pyc,*.class
|
||||||
set splitbelow " Preview window
|
set splitbelow " Preview window
|
||||||
set splitright
|
set splitright
|
||||||
|
|
||||||
" let mapleader=","
|
let mapleader=","
|
||||||
|
|
||||||
"" Session
|
"" Session
|
||||||
let g:session_autosave = 'no'
|
let g:session_autosave = 'no'
|
||||||
|
@ -173,14 +203,14 @@ map ,H :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<'
|
||||||
let g:explHideFiles='^\.,.*\.class$,.*\.swp$,.*\.pyc$,.*\.swo$,\.DS_Store$,/tmp/v\d\d*'
|
let g:explHideFiles='^\.,.*\.class$,.*\.swp$,.*\.pyc$,.*\.swo$,\.DS_Store$,/tmp/v\d\d*'
|
||||||
let g:explDetailedHelp=1
|
let g:explDetailedHelp=1
|
||||||
|
|
||||||
"" Backup
|
"" Backup
|
||||||
set backup
|
set backup
|
||||||
set backupcopy=yes
|
set backupcopy=yes
|
||||||
set backupdir=~/.vim/backup,~/.tmp,~/tmp,/var/tmp,/tmp"
|
set backupdir=~/.vim/backup,~/.tmp,~/tmp,/var/tmp,/tmp"
|
||||||
set directory=~/.vim/backup,~/.tmp,~/tmp,/var/tmp,/tmp"
|
set directory=~/.vim/backup,~/.tmp,~/tmp,/var/tmp,/tmp"
|
||||||
let myvar = strftime("%y%m%d-%H%M")
|
let myvar = strftime("%y%m%d-%H%M")
|
||||||
let myvar = "set backupext=_". myvar
|
let myvar = "set backupext=_". myvar
|
||||||
execute myvar
|
execute myvar
|
||||||
au BufWritePre * let &backupext = substitute(expand("%:p"), "\/", "_", "g")
|
au BufWritePre * let &backupext = substitute(expand("%:p"), "\/", "_", "g")
|
||||||
|
|
||||||
set wildignore+=*/tmp/*,*.so,*.swp,*.zip,*.class,*/target/*,*/.git/*"
|
set wildignore+=*/tmp/*,*.so,*.swp,*.zip,*.class,*/target/*,*/.git/*"
|
||||||
|
@ -218,13 +248,46 @@ inoremap <C-S-Right> <C-\><C-O>gh<C-O>w
|
||||||
map <silent> <c-/> :TComment<cr>
|
map <silent> <c-/> :TComment<cr>
|
||||||
imap <silent> <c-/> <c--><c-->
|
imap <silent> <c-/> <c--><c-->
|
||||||
|
|
||||||
"" SCM Stuff
|
"" Git
|
||||||
let g:SCMDiffCommand = "git"
|
let g:SCMDiffCommand = "git"
|
||||||
let VCSCommandDeleteOnHide = 1
|
let VCSCommandDeleteOnHide = 1
|
||||||
let g:git_branch_status_nogit=""
|
let g:git_branch_status_nogit=""
|
||||||
let g:git_branch_status_around="[]"
|
let g:git_branch_status_around="[]"
|
||||||
let g:git_branch_status_text=""
|
let g:git_branch_status_text=""
|
||||||
let g:git_branch_status_head_current=1
|
let g:git_branch_status_head_current=1
|
||||||
|
let g:gitgutter_override_sign_column_highlight = 0
|
||||||
|
let g:gitgutter_sign_added = ''
|
||||||
|
let g:gitgutter_sign_modified = ''
|
||||||
|
let g:gitgutter_sign_removed = ''
|
||||||
|
let g:gitgutter_sign_removed_first_line = ''
|
||||||
|
let g:gitgutter_sign_modified_removed = ''
|
||||||
|
|
||||||
|
"" Syntastic
|
||||||
|
let g:syntastic_always_populate_loc_list = 1
|
||||||
|
let g:syntastic_auto_loc_list = 1
|
||||||
|
let g:syntastic_check_on_open = 1
|
||||||
|
let g:syntastic_check_on_wq = 0
|
||||||
|
let g:syntastic_enable_signs = 1
|
||||||
|
let g:syntastic_error_symbol = "✗"
|
||||||
|
let syntastic_style_error_symbol = "✗"
|
||||||
|
let g:syntastic_warning_symbol = "∙∙"
|
||||||
|
let syntastic_style_warning_symbol = "∙∙"
|
||||||
|
|
||||||
|
"" ALE
|
||||||
|
let g:airline#extensions#ale#enabled = 1
|
||||||
|
let g:ale_sign_column_always = 1
|
||||||
|
let g:ale_sign_error = '' " ﱥ ﬡ 樂
|
||||||
|
let g:ale_sign_warning = ''
|
||||||
|
" let g:ale_linters = {'go': ['gofmt']}
|
||||||
|
" let g:ale_linters = {'go': ['go build', 'gofmt', 'golint', 'gometalinter', 'gosimple', 'go vet', 'staticcheck']}
|
||||||
|
" let g:ale_linters = {'go': ['gofmt', 'golint', 'gometalinter', 'gosimple', 'go vet', 'staticcheck']}
|
||||||
|
let g:ale_linters = {'go': ['gofmt', 'gometalinter']}
|
||||||
|
let g:go_gometalinter_options = join([
|
||||||
|
\ '--fast'
|
||||||
|
\ ], ' ')
|
||||||
|
nmap <silent> <C-k> <Plug>(ale_previous_wrap)
|
||||||
|
nmap <silent> <C-j> <Plug>(ale_next_wrap)
|
||||||
|
|
||||||
|
|
||||||
"" Buffer navigation
|
"" Buffer navigation
|
||||||
map <silent> ` :b#<CR>
|
map <silent> ` :b#<CR>
|
||||||
|
@ -239,7 +302,7 @@ nmap <silent> ,/ :let @/=""<CR>
|
||||||
""
|
""
|
||||||
|
|
||||||
au BufNewFile,BufRead manifest setlocal ft=json
|
au BufNewFile,BufRead manifest setlocal ft=json
|
||||||
au BufNewFile,BufRead *.aurora set filetype=python
|
au BufNewFile,BufRead *.aurora set filetype=python
|
||||||
au BufNewFile,BufRead *.avdl setlocal ft=avro-idl
|
au BufNewFile,BufRead *.avdl setlocal ft=avro-idl
|
||||||
au BufNewFile,BufRead *.avpr setlocal ft=json
|
au BufNewFile,BufRead *.avpr setlocal ft=json
|
||||||
au BufNewFile,BufRead *.bazel setlocal ft=bzl
|
au BufNewFile,BufRead *.bazel setlocal ft=bzl
|
||||||
|
@ -247,13 +310,13 @@ au BufNewFile,BufRead *.cql set syntax=cql
|
||||||
au BufNewFile,BufRead *.go setlocal ft=go
|
au BufNewFile,BufRead *.go setlocal ft=go
|
||||||
au BufNewFile,BufRead *.g setlocal ft=antlr
|
au BufNewFile,BufRead *.g setlocal ft=antlr
|
||||||
au BufNewFile,BufRead *.js set ft=javascript
|
au BufNewFile,BufRead *.js set ft=javascript
|
||||||
au BufNewFile,BufRead *.json setfiletype json
|
au BufNewFile,BufRead *.json setfiletype json
|
||||||
au BufNewFile,BufRead *.pig set filetype=pig syntax=pig
|
au BufNewFile,BufRead *.pig set filetype=pig syntax=pig
|
||||||
au BufNewFile,BufRead *.template setfiletype json
|
au BufNewFile,BufRead *.template setfiletype json
|
||||||
au BufNewFile,BufRead *.thrift setlocal ft=thrift
|
au BufNewFile,BufRead *.thrift setlocal ft=thrift
|
||||||
au BufNewFile,BufRead *.upstart set filetype=upstart
|
au BufNewFile,BufRead *.upstart set filetype=upstart
|
||||||
au BufNewFile,BufRead *.upstart.conf set filetype=upstart
|
au BufNewFile,BufRead *.upstart.conf set filetype=upstart
|
||||||
au BufNewFile,BufRead SCons* set filetype=python
|
au BufNewFile,BufRead SCons* set filetype=python
|
||||||
|
|
||||||
"" JavaScript, Json
|
"" JavaScript, Json
|
||||||
let g:vim_json_syntax_conceal = 0
|
let g:vim_json_syntax_conceal = 0
|
||||||
|
@ -294,9 +357,81 @@ let g:pymode_lint = 0
|
||||||
let g:pymode_lint_checker = "pyflakes"
|
let g:pymode_lint_checker = "pyflakes"
|
||||||
|
|
||||||
" enable ncm2 for all buffers
|
" enable ncm2 for all buffers
|
||||||
autocmd BufEnter * call ncm2#enable_for_buffer()
|
" autocmd BufEnter * call ncm2#enable_for_buffer()
|
||||||
set completeopt=noinsert,menuone,noselect
|
set completeopt=noinsert,menuone,noselect
|
||||||
|
|
||||||
|
|
||||||
|
"" COC completion
|
||||||
|
|
||||||
|
" Use tab for trigger completion with characters ahead and navigate.
|
||||||
|
" Use command ':verbose imap <tab>' to make sure tab is not mapped by other plugin.
|
||||||
|
inoremap <silent><expr> <TAB>
|
||||||
|
\ pumvisible() ? "\<C-n>" :
|
||||||
|
\ <SID>check_back_space() ? "\<TAB>" :
|
||||||
|
\ coc#refresh()
|
||||||
|
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
|
||||||
|
|
||||||
|
function! s:check_back_space() abort
|
||||||
|
let col = col('.') - 1
|
||||||
|
return !col || getline('.')[col - 1] =~# '\s'
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" Use <c-space> for trigger completion.
|
||||||
|
inoremap <silent><expr> <c-space> coc#refresh()
|
||||||
|
|
||||||
|
" Use <cr> for confirm completion, `<C-g>u` means break undo chain at current position.
|
||||||
|
" Coc only does snippet and additional edit on confirm.
|
||||||
|
inoremap <expr> <cr> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"
|
||||||
|
|
||||||
|
" Use `[c` and `]c` for navigate diagnostics
|
||||||
|
nmap <silent> [c <Plug>(coc-diagnostic-prev)
|
||||||
|
nmap <silent> ]c <Plug>(coc-diagnostic-next)
|
||||||
|
|
||||||
|
" Remap keys for gotos
|
||||||
|
nmap <silent> gd <Plug>(coc-definition)
|
||||||
|
nmap <silent> gy <Plug>(coc-type-definition)
|
||||||
|
nmap <silent> gi <Plug>(coc-implementation)
|
||||||
|
nmap <silent> gr <Plug>(coc-references)
|
||||||
|
|
||||||
|
" Use K for show documentation in preview window
|
||||||
|
nnoremap <silent> K :call <SID>show_documentation()<CR>
|
||||||
|
|
||||||
|
function! s:show_documentation()
|
||||||
|
if &filetype == 'vim'
|
||||||
|
execute 'h '.expand('<cword>')
|
||||||
|
else
|
||||||
|
call CocAction('doHover')
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" Highlight symbol under cursor on CursorHold
|
||||||
|
autocmd CursorHold * silent call CocActionAsync('highlight')
|
||||||
|
|
||||||
|
" Remap for rename current word
|
||||||
|
nmap <leader>rn <Plug>(coc-rename)
|
||||||
|
|
||||||
|
" Remap for format selected region
|
||||||
|
vmap <leader>f <Plug>(coc-format-selected)
|
||||||
|
nmap <leader>f <Plug>(coc-format-selected)
|
||||||
|
|
||||||
|
augroup mygroup
|
||||||
|
autocmd!
|
||||||
|
" Setup formatexpr specified filetype(s).
|
||||||
|
autocmd FileType typescript,json setl formatexpr=CocAction('formatSelected')
|
||||||
|
" Update signature help on jump placeholder
|
||||||
|
autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp')
|
||||||
|
augroup end
|
||||||
|
|
||||||
|
" Remap for do codeAction of selected region, ex: `<leader>aap` for current paragraph
|
||||||
|
vmap <leader>a <Plug>(coc-codeaction-selected)
|
||||||
|
nmap <leader>a <Plug>(coc-codeaction-selected)
|
||||||
|
|
||||||
|
" Remap for do codeAction of current line
|
||||||
|
nmap <leader>ac <Plug>(coc-codeaction)
|
||||||
|
" Fix autofix problem of current line
|
||||||
|
nmap <leader>qf <Plug>(coc-fix-current)
|
||||||
|
|
||||||
|
|
||||||
" tags
|
" tags
|
||||||
set tags=./tags;/
|
set tags=./tags;/
|
||||||
|
|
||||||
|
@ -307,7 +442,7 @@ function! EnhanceCppSyntax()
|
||||||
syn match cppFuncDef "::\~\?\zs\h\w*\ze([^)]*\()\s*\(const\)\?\)\?$"
|
syn match cppFuncDef "::\~\?\zs\h\w*\ze([^)]*\()\s*\(const\)\?\)\?$"
|
||||||
hi def link cppFuncDef Special
|
hi def link cppFuncDef Special
|
||||||
endfunction
|
endfunction
|
||||||
autocmd Syntax cpp call EnhanceCppSyntax()
|
autocmd Syntax cpp call EnhanceCppSyntax()
|
||||||
autocmd FileType cpp setlocal expandtab shiftwidth=2 tabstop=2 softtabstop=2
|
autocmd FileType cpp setlocal expandtab shiftwidth=2 tabstop=2 softtabstop=2
|
||||||
|
|
||||||
" HTML
|
" HTML
|
||||||
|
@ -340,32 +475,6 @@ let g:fzf_colors =
|
||||||
\ 'spinner': ['fg', 'Label'],
|
\ 'spinner': ['fg', 'Label'],
|
||||||
\ 'header': ['fg', 'Normal'] }
|
\ 'header': ['fg', 'Normal'] }
|
||||||
|
|
||||||
""
|
|
||||||
"" Color theme
|
|
||||||
""
|
|
||||||
if $TERM =~ '^xterm'
|
|
||||||
set t_Co=256
|
|
||||||
elseif $TERM =~ '^screen'
|
|
||||||
set t_Co=256 " just guessing
|
|
||||||
elseif $TERM =~ '^rxvt'
|
|
||||||
set t_Co=256
|
|
||||||
elseif $TERM =~ '^linux'
|
|
||||||
set t_Co=8
|
|
||||||
else
|
|
||||||
set t_Co=16
|
|
||||||
endif
|
|
||||||
|
|
||||||
if &term =~ "xterm" || &term =~ "screen" || &term == "screen"
|
|
||||||
set t_Co=256
|
|
||||||
if has("terminfo")
|
|
||||||
let &t_Sf=nr2char(27).'[3%p1%dm'
|
|
||||||
let &t_Sb=nr2char(27).'[4%p1%dm'
|
|
||||||
else
|
|
||||||
let &t_Sf=nr2char(27).'[3%dm'
|
|
||||||
let &t_Sb=nr2char(27).'[4%dm'
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
" Show syntax highlight group in the status bar
|
" Show syntax highlight group in the status bar
|
||||||
map ,h :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<'
|
map ,h :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<'
|
||||||
\ . synIDattr(synID(line("."),col("."),0),"name") . "> lo<"
|
\ . synIDattr(synID(line("."),col("."),0),"name") . "> lo<"
|
||||||
|
@ -375,89 +484,9 @@ set background=dark
|
||||||
let g:one_allow_italics=1
|
let g:one_allow_italics=1
|
||||||
let g:PaperColor_Light_Override = { 'Background' : '#fefe00' }
|
let g:PaperColor_Light_Override = { 'Background' : '#fefe00' }
|
||||||
|
|
||||||
let g:lightline = {
|
|
||||||
\ 'colorscheme': 'jellybeans',
|
|
||||||
\ 'active': {
|
|
||||||
\ 'left': [ [ 'mode', 'paste'],
|
|
||||||
\ [ 'fugitive', 'filename', 'modified'],
|
|
||||||
\ [ 'go'] ],
|
|
||||||
\ 'right': [ [ 'lineinfo' ],
|
|
||||||
\ [ 'percent' ],
|
|
||||||
\ [ 'fileformat', 'fileencoding', 'filetype' ] ]
|
|
||||||
\ },
|
|
||||||
\ 'component_function': {
|
|
||||||
\ 'fileencoding': 'LightLineFileencoding',
|
|
||||||
\ 'fileformat': 'LightLineFileformat',
|
|
||||||
\ 'filename': 'LightLineFilename',
|
|
||||||
\ 'filetype': 'LightLineFiletype',
|
|
||||||
\ 'fugitive': 'LightLineFugitive',
|
|
||||||
\ 'go': 'LightLineGo',
|
|
||||||
\ 'lineinfo': 'LightLineInfo',
|
|
||||||
\ 'mode': 'LightLineMode',
|
|
||||||
\ 'modified': 'LightLineModified',
|
|
||||||
\ 'percent': 'LightLinePercent',
|
|
||||||
\ }
|
|
||||||
\ }
|
|
||||||
|
|
||||||
function! LightLineModified()
|
|
||||||
if &filetype == "help"
|
|
||||||
return ""
|
|
||||||
elseif &modified
|
|
||||||
return "+"
|
|
||||||
elseif &modifiable
|
|
||||||
return ""
|
|
||||||
else
|
|
||||||
return ""
|
|
||||||
endif
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! LightLineFileformat()
|
|
||||||
return winwidth(0) > 70 ? &fileformat : ''
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! LightLineFiletype()
|
|
||||||
return winwidth(0) > 70 ? (strlen(&filetype) ? &filetype : 'no ft') : ''
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! LightLineFileencoding()
|
|
||||||
return winwidth(0) > 70 ? (strlen(&fenc) ? &fenc : &enc) : ''
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! LightLineInfo()
|
|
||||||
return winwidth(0) > 60 ? printf("%3d:%-2d", line('.'), col('.')) : ''
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! LightLinePercent()
|
|
||||||
return &ft =~? (100 * line('.') / line('$')) . '%'
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! LightLineFugitive()
|
|
||||||
return exists('*fugitive#head') ? fugitive#head() : ''
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! LightLineGo()
|
|
||||||
" return ''
|
|
||||||
return exists('*go#jobcontrol#Statusline') ? go#jobcontrol#Statusline() : ''
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! LightLineMode()
|
|
||||||
return lightline#mode()
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! LightLineFilename()
|
|
||||||
return expand('%:p:~')
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! LightLineReadonly()
|
|
||||||
return &ft !~? 'help' && &readonly ? '' : ''
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
" set statusline+=%#warningmsg#
|
|
||||||
" set statusline+=%{SyntasticStatuslineFlag()}
|
|
||||||
" set statusline+=%*
|
|
||||||
|
|
||||||
" Golang
|
" Golang
|
||||||
let g:go_highlight_build_constraints = 1
|
let g:go_highlight_build_constraints = 1
|
||||||
let g:go_highlight_extra_types = 1
|
let g:go_highlight_extra_types = 1
|
||||||
let g:go_highlight_fields = 1
|
let g:go_highlight_fields = 1
|
||||||
let g:go_highlight_functions = 1
|
let g:go_highlight_functions = 1
|
||||||
|
@ -478,18 +507,6 @@ autocmd FileType go nmap <Leader>i <Plug>(go-info)
|
||||||
autocmd FileType go nmap <S-k> <Plug>(go-doc)
|
autocmd FileType go nmap <S-k> <Plug>(go-doc)
|
||||||
autocmd FileType go nmap <Leader>d <Plug>(go-doc-vertical)
|
autocmd FileType go nmap <Leader>d <Plug>(go-doc-vertical)
|
||||||
|
|
||||||
" ALE
|
|
||||||
let g:ale_sign_column_always = 1
|
|
||||||
" let g:ale_linters = {'go': ['gofmt']}
|
|
||||||
" let g:ale_linters = {'go': ['go build', 'gofmt', 'golint', 'gometalinter', 'gosimple', 'go vet', 'staticcheck']}
|
|
||||||
" let g:ale_linters = {'go': ['gofmt', 'golint', 'gometalinter', 'gosimple', 'go vet', 'staticcheck']}
|
|
||||||
let g:ale_linters = {'go': ['gofmt', 'gometalinter']}
|
|
||||||
let g:ale_sign_error = '⤫'
|
|
||||||
let g:ale_sign_warning = '⚠'
|
|
||||||
let g:airline#extensions#ale#enabled = 1
|
|
||||||
let g:go_gometalinter_options = join([
|
|
||||||
\ '--fast'
|
|
||||||
\ ], ' ')
|
|
||||||
|
|
||||||
"" Neosnippet
|
"" Neosnippet
|
||||||
" imap <C-k> <Plug>(neosnippet_expand_or_jump)
|
" imap <C-k> <Plug>(neosnippet_expand_or_jump)
|
||||||
|
@ -510,17 +527,33 @@ let g:vim_markdown_frontmatter = 1
|
||||||
let g:vim_markdown_toml_frontmatter = 1
|
let g:vim_markdown_toml_frontmatter = 1
|
||||||
|
|
||||||
|
|
||||||
"" Git
|
|
||||||
let g:gitgutter_override_sign_column_highlight = 0
|
|
||||||
let g:gitgutter_sign_added = '🞥'
|
|
||||||
let g:gitgutter_sign_modified = '▲'
|
|
||||||
let g:gitgutter_sign_removed = '🞬'
|
|
||||||
let g:gitgutter_sign_removed_first_line = '🞬'
|
|
||||||
let g:gitgutter_sign_modified_removed = '🞬'
|
|
||||||
|
|
||||||
"" Airline
|
"" Airline
|
||||||
" let g:airline#extensions#tabline#enabled = 1
|
let g:airline_theme='distinguished'
|
||||||
let g:airline_theme='cool'
|
let g:airline_powerline_fonts = 1
|
||||||
|
let g:airline_skip_empty_sections = 1
|
||||||
|
let g:airline#parts#ffenc#skip_expected_string='utf-8[unix]'
|
||||||
|
let g:airline_section_x = '' " Hide file type
|
||||||
|
let g:airline_section_z = "\uf0c9 %l \ufb87 %c"
|
||||||
|
let g:airline_mode_map = {
|
||||||
|
\ '__' : '-',
|
||||||
|
\ 'c' : 'C',
|
||||||
|
\ 'i' : 'I',
|
||||||
|
\ 'ic' : 'I',
|
||||||
|
\ 'ix' : 'I',
|
||||||
|
\ 'n' : "\ue62b",
|
||||||
|
\ 'ni' : "\ue62b",
|
||||||
|
\ 'no' : "\ue62b",
|
||||||
|
\ 'R' : 'R',
|
||||||
|
\ 'Rv' : 'R',
|
||||||
|
\ 's' : 'S',
|
||||||
|
\ 'S' : 'S',
|
||||||
|
\ '' : 'S',
|
||||||
|
\ 't' : 'T',
|
||||||
|
\ 'v' : 'V',
|
||||||
|
\ 'V' : 'V',
|
||||||
|
\ '' : 'V',
|
||||||
|
\ }
|
||||||
|
|
||||||
"" Terminal
|
"" Terminal
|
||||||
|
|
||||||
|
@ -532,17 +565,7 @@ let &t_8b = "<Esc>[48;2;%lu;%lu;%lum"
|
||||||
" color dln-light
|
" color dln-light
|
||||||
color dln-dark
|
color dln-dark
|
||||||
|
|
||||||
" highlight LineNr ctermfg=31 ctermbg=234 cterm=italic
|
map ,l :color dln-dark<CR>
|
||||||
" highlight CursorLine ctermfg=159 ctermbg=24
|
|
||||||
" highlight SignColumn ctermbg=234
|
|
||||||
" highlight Search ctermbg=237 ctermfg=none cterm=none
|
|
||||||
|
|
||||||
highlight GitGutterAdd ctermbg=234 ctermfg=58
|
|
||||||
highlight GitGutterChange ctermbg=234 ctermfg=220
|
|
||||||
highlight GitGutterDelete ctermbg=234 ctermfg=124
|
|
||||||
highlight GitGutterChangeDelete ctermbg=234 ctermfg=88
|
|
||||||
|
|
||||||
map ,l :color dln-light<CR>
|
|
||||||
|
|
||||||
let s:hidden_all = 1
|
let s:hidden_all = 1
|
||||||
set noshowmode
|
set noshowmode
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
rofi.font: IBM Plex Sans 16
|
rofi.font: IBM Plex Sans 16
|
||||||
rofi.dpi: 240
|
rofi.dpi: 210
|
||||||
|
|
11
.tmux.conf
11
.tmux.conf
|
@ -51,6 +51,7 @@ bind -n M-7 select-window -t 7
|
||||||
bind -n M-8 select-window -t 8
|
bind -n M-8 select-window -t 8
|
||||||
bind -n M-9 select-window -t 9
|
bind -n M-9 select-window -t 9
|
||||||
bind -n M-0 select-window -t 10
|
bind -n M-0 select-window -t 10
|
||||||
|
bind -n M-m send-keys -t 9 q C-u "clear; tmux clear-history -t 9" C-m C-p C-p C-p C-m
|
||||||
bind 1 select-window -t 1
|
bind 1 select-window -t 1
|
||||||
bind 2 select-window -t 2
|
bind 2 select-window -t 2
|
||||||
bind 3 select-window -t 3
|
bind 3 select-window -t 3
|
||||||
|
@ -87,10 +88,12 @@ setw -g window-status-format ""
|
||||||
setw -g window-status-current-format "#W"
|
setw -g window-status-current-format "#W"
|
||||||
setw -g window-status-separator ""
|
setw -g window-status-separator ""
|
||||||
|
|
||||||
set -g status-fg "#aaaaaa"
|
set -g status-fg "#6699aa"
|
||||||
set -g status-bg "#222222"
|
set -g status-bg "#1a2a3a"
|
||||||
set -g status-left '#[bg=#114400,fg=#77aa22] #I #[bg=#334455,fg=#7799aa] #h #[default] '
|
set -g status-left '#[bg=#0055aa,fg=#aabbcc] #I #[default] '
|
||||||
set -g status-right '#[fg=#666666]|#[bg=#222222,fg=#99cc99] #{?#(tmux show-buffer -b project),#(tmux show-buffer -b project),-} #[bg=#222222,fg=#666666]| #{battery_percentage} #{battery_remain} | #(date +"%R") '
|
# set -g status-right '#[fg=#666666]|#[bg=#222222,fg=#99cc99] #{?#(tmux show-buffer -b project),#(tmux show-buffer -b project),-} #[bg=#222222,fg=#666666]| #{battery_percentage} #{battery_remain} | %a %h-%d %H:%M | #(date +"%R") '
|
||||||
|
|
||||||
|
set -g status-right '#{battery_icon} #{battery_percentage} %a %h-%d %H:%M '
|
||||||
|
|
||||||
if-shell '[[ $(hostname) = "dredd" ]]' 'set -g status-left "#[bg=#114400,fg=#77aa22] #I #[bg=#0055aa,fg=#aabbcc] #h #[default] "'
|
if-shell '[[ $(hostname) = "dredd" ]]' 'set -g status-left "#[bg=#114400,fg=#77aa22] #I #[bg=#0055aa,fg=#aabbcc] #h #[default] "'
|
||||||
if-shell '[[ $(hostname) != "dredd" ]]' 'set -g status-left "#[bg=#114400,fg=#77aa22] #I #[bg=#339900,fg=#000000] #h #[default] "'
|
if-shell '[[ $(hostname) != "dredd" ]]' 'set -g status-left "#[bg=#114400,fg=#77aa22] #I #[bg=#339900,fg=#000000] #h #[default] "'
|
||||||
|
|
4
.zshrc
4
.zshrc
|
@ -267,3 +267,7 @@ alias xc='xclip -selection clipboard'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
|
||||||
|
|
||||||
|
export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
lpass login --trust dln@eintr.org
|
lpass login --trust dln@eintr.org
|
||||||
lp-ssh-add ssh/id_rsa
|
lp-ssh-add ssh/id_rsa
|
||||||
lp-ssh-add ssh/id_rsa_seed_infra
|
lp-ssh-add ssh/id_rsa_embark
|
||||||
|
|
1
bin/st
1
bin/st
|
@ -1 +0,0 @@
|
||||||
st.dark
|
|
BIN
bin/st.dark
BIN
bin/st.dark
Binary file not shown.
Loading…
Reference in a new issue