What hath gawd wrought

This commit is contained in:
Dan Buch 2024-09-06 14:02:18 -04:00
parent 2e449c15bd
commit 950d1a928e
Signed by: meatballhat
GPG Key ID: A12F782281063434

42
vimrc
View File

@ -15,7 +15,7 @@ set backupdir^=~/.vim/_backup//
set cursorline set cursorline
set cursorcolumn set cursorcolumn
set directory^=~/.vim/_temp// set directory^=~/.vim/_temp//
set encoding=utf8 set encoding=utf-8
set hlsearch set hlsearch
set ignorecase set ignorecase
set incsearch set incsearch
@ -24,11 +24,12 @@ set linebreak
set modeline set modeline
set nowrap set nowrap
set number set number
set signcolumn=yes
set smartcase set smartcase
set statusline+=%#warningmsg# set statusline+=%#warningmsg#
set statusline+=%* set statusline+=%*
set tabstop=4 set tabstop=4
set updatetime=100 set updatetime=300
set textwidth=1000 set textwidth=1000
if has("persistent_undo") if has("persistent_undo")
@ -46,9 +47,11 @@ au BufRead,BufNewFile .envrc setfiletype sh
au BufRead,BufNewFile Dockerfile* setfiletype dockerfile au BufRead,BufNewFile Dockerfile* setfiletype dockerfile
au BufRead,BufNewFile Pipfile setfiletype toml au BufRead,BufNewFile Pipfile setfiletype toml
au BufRead,BufNewFile kubectl-edit-status-* setfiletype yaml au BufRead,BufNewFile kubectl-edit-status-* setfiletype yaml
au BufRead,BufNewFile *kubeconfig* setfiletype yaml
au BufRead,BufNewFile .lintr setfiletype yaml au BufRead,BufNewFile .lintr setfiletype yaml
au BufRead,BufNewFile devcontainer.json setfiletype jsonc au BufRead,BufNewFile devcontainer.json setfiletype jsonc
au BufRead,BufNewFile devcontainer-feature.json setfiletype jsonc au BufRead,BufNewFile devcontainer-feature.json setfiletype jsonc
au BufRead,BufNewFile *.bicepparam setfiletype bicep
au BufNewFile,BufRead *.go setlocal noexpandtab tabstop=4 shiftwidth=4 au BufNewFile,BufRead *.go setlocal noexpandtab tabstop=4 shiftwidth=4
au FileType go nmap <leader>r <Plug>(go-run) au FileType go nmap <leader>r <Plug>(go-run)
au FileType go nmap <Leader>c <Plug>(go-coverage-toggle) au FileType go nmap <Leader>c <Plug>(go-coverage-toggle)
@ -77,15 +80,16 @@ map <leader>l :Minimap<CR>
map <leader>L :MinimapClose<CR> map <leader>L :MinimapClose<CR>
nmap <F8> :TagbarToggle<CR> nmap <F8> :TagbarToggle<CR>
augroup black_on_save "augroup black_on_save
autocmd! " autocmd!
autocmd BufWritePre *.py Black " autocmd BufWritePre *.py Black
augroup end "augroup end
autocmd BufNewFile,BufRead *.c set formatprg=astyle\ -t4\ -A14 autocmd BufNewFile,BufRead *.c set formatprg=astyle\ -t4\ -A14
let g:EditorConfig_exclude_patterns = ['fugitive://.*', 'scp://.*'] let g:EditorConfig_exclude_patterns = ['fugitive://.*', 'scp://.*']
let g:airline_powerline_fonts = 1 let g:airline_powerline_fonts = 1
let g:black_use_virtualenv = 1
let g:coc_global_extensions = ['coc-tsserver'] let g:coc_global_extensions = ['coc-tsserver']
let g:coc_node_path = "/home/dan/.nvm/versions/node/v16.9.1/bin/node" let g:coc_node_path = "/home/dan/.nvm/versions/node/v16.9.1/bin/node"
let g:go_auto_sameids = 1 let g:go_auto_sameids = 1
@ -108,6 +112,7 @@ let g:minimap_highlight_search = 1
let g:minimap_enable_highlight_colorgroup = 1 let g:minimap_enable_highlight_colorgroup = 1
let g:minimap_width = 10 let g:minimap_width = 10
let g:python_highlight_all = 1 let g:python_highlight_all = 1
let g:rehash256 = 1
let g:rustfmt_autosave = 1 let g:rustfmt_autosave = 1
let g:shfmt_extra_args = '-i 2' let g:shfmt_extra_args = '-i 2'
let g:shfmt_fmt_on_save = 1 let g:shfmt_fmt_on_save = 1
@ -117,7 +122,16 @@ let g:vim_markdown_folding_disabled = 1
let g:vim_markdown_frontmatter = 1 let g:vim_markdown_frontmatter = 1
let g:yapf_style = "pep8" let g:yapf_style = "pep8"
colorscheme dracula
if exists('+termguicolors')
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
set termguicolors
endif
"colorscheme dichromatic
"colorscheme darcula
colorscheme molokai
hi Comment cterm=NONE ctermfg=DarkRed gui=NONE guifg=red2 hi Comment cterm=NONE ctermfg=DarkRed gui=NONE guifg=red2
hi minimapCursor ctermbg=59 ctermfg=228 guibg=#5F5F5F guifg=#FFFF87 hi minimapCursor ctermbg=59 ctermfg=228 guibg=#5F5F5F guifg=#FFFF87
@ -131,16 +145,4 @@ function! <SID>SynStack()
echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")') echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")')
endfunc endfunc
" use <tab> to trigger completion and navigate to the next complete item source ~/.vimrc.coc
function! CheckBackspace() abort
let col = col('.') - 1
return !col || getline('.')[col - 1] =~# '\s'
endfunction
inoremap <silent><expr> <Tab>
\ coc#pum#visible() ? coc#pum#next(1) :
\ CheckBackspace() ? "\<Tab>" :
\ coc#refresh()
inoremap <expr> <Tab> coc#pum#visible() ? coc#pum#next(1) : "\<Tab>"
inoremap <expr> <S-Tab> coc#pum#visible() ? coc#pum#prev(1) : "\<S-Tab>"