packloadall call pathogen#infect() syntax on filetype on filetype indent on filetype plugin on let mapleader = "," set autowrite set backspace=indent,eol,start set backupdir^=~/.vim/_backup// set cursorline set cursorcolumn set directory^=~/.vim/_temp// set encoding=utf8 set hlsearch set ignorecase set incsearch set laststatus=2 set linebreak set modeline set nowrap set number set smartcase set statusline+=%#warningmsg# set statusline+=%* set tabstop=4 set updatetime=100 set textwidth=1000 if has("persistent_undo") set undodir=~/.vim/_undo// set undofile endif au BufRead,BufNewFile *.gcfg setfiletype gitconfig au BufRead,BufNewFile *.gotmpl setfiletype gotexttmpl au BufRead,BufNewFile *.hcl setfiletype hcl au BufRead,BufNewFile *.nomad setfiletype hcl au BufRead,BufNewFile *.service setfiletype systemd au BufRead,BufNewFile .Rprofile setfiletype r au BufRead,BufNewFile .envrc setfiletype sh au BufRead,BufNewFile Dockerfile* setfiletype dockerfile au BufRead,BufNewFile Pipfile setfiletype toml au BufRead,BufNewFile kubectl-edit-status-* setfiletype yaml au BufRead,BufNewFile .lintr setfiletype yaml au BufRead,BufNewFile devcontainer.json setfiletype jsonc au BufRead,BufNewFile devcontainer-feature.json setfiletype jsonc au BufNewFile,BufRead *.go setlocal noexpandtab tabstop=4 shiftwidth=4 au FileType go nmap r (go-run) au FileType go nmap c (go-coverage-toggle) au FileType sh set expandtab au QuickFixCmdPost *grep* cwindow " run :GoBuild or :GoTestCompile based on the go file function! s:build_go_files() let l:file = expand('%') if l:file =~# '^\f\+_test\.go$' call go#test#Test(0, 1) elseif l:file =~# '^\f\+\.go$' call go#cmd#Build(0) endif endfunction au FileType go nmap b :call build_go_files() au FileType go nmap d :GoDef au FileType go nmap N :GoRename au FileType go nmap R :GoReferrers map t :w map - :nohl map w :%s/ *$// map l :Minimap map L :MinimapClose nmap :TagbarToggle augroup black_on_save autocmd! autocmd BufWritePre *.py Black augroup end let g:EditorConfig_exclude_patterns = ['fugitive://.*', 'scp://.*'] let g:airline_powerline_fonts = 1 let g:coc_global_extensions = ['coc-tsserver'] 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_type_info = 1 let g:go_def_mode='gopls' let g:go_fmt_command = "goimports" let g:go_highlight_build_constraints = 1 let g:go_highlight_extra_types = 1 let g:go_highlight_fields = 1 let g:go_highlight_function_calls = 1 let g:go_highlight_functions = 1 let g:go_highlight_operators = 1 let g:go_info_mode='gopls' let g:html_indent_script1 = "inc" let g:html_indent_style1 = "inc" let g:minimap_auto_start = 1 let g:minimap_auto_start_win_enter = 1 let g:minimap_highlight_range = 1 let g:minimap_highlight_search = 1 let g:minimap_enable_highlight_colorgroup = 1 let g:minimap_width = 10 let g:python_highlight_all = 1 let g:rustfmt_autosave = 1 let g:shfmt_extra_args = '-i 2' let g:shfmt_fmt_on_save = 1 let g:terraform_align = 1 let g:terraform_fmt_on_save = 1 let g:vim_markdown_folding_disabled = 1 let g:vim_markdown_frontmatter = 1 let g:yapf_style = "pep8" colorscheme dracula hi Comment cterm=NONE ctermfg=DarkRed gui=NONE guifg=red2 hi minimapCursor ctermbg=59 ctermfg=228 guibg=#5F5F5F guifg=#FFFF87 hi minimapRange ctermbg=242 ctermfg=228 guibg=#4F4F4F guifg=#FFFF87 nmap sp :call SynStack() function! SynStack() if !exists("*synstack") return endif echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")') endfunc " use to trigger completion and navigate to the next complete item function! CheckBackspace() abort let col = col('.') - 1 return !col || getline('.')[col - 1] =~# '\s' endfunction inoremap \ coc#pum#visible() ? coc#pum#next(1) : \ CheckBackspace() ? "\" : \ coc#refresh() inoremap coc#pum#visible() ? coc#pum#next(1) : "\" inoremap coc#pum#visible() ? coc#pum#prev(1) : "\"