" Run PlugInstall if there are missing plugins autocmd VimEnter * \ if len(filter(values(g:plugs), '!isdirectory(v:val.dir)')) \| PlugInstall --sync | q \| endif """"" "--- Plugins call plug#begin() " General Plug 'ojroques/vim-oscyank' Plug 'tpope/vim-obsession' Plug 'tmux-plugins/vim-tmux-focus-events' " Look Plug 'vim-airline/vim-airline' Plug 'sainnhe/edge' Plug 'Yggdroot/indentLine' Plug 'koenverburg/peepsight.nvim' " Git Plug 'airblade/vim-gitgutter' " Search/Files Plug 'nvim-lua/plenary.nvim' Plug 'nvim-telescope/telescope.nvim' Plug 'ANGkeith/telescope-terraform-doc.nvim' Plug 'fannheyward/telescope-coc.nvim' " Ignore/Edit files Plug 'vim-scripts/gitignore' " Coding helpers Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} Plug 'neoclide/coc.nvim', {'branch': 'release'} call plug#end() """"" "--- CodeServer Configurations let g:coc_global_extensions = [ \ 'coc-tsserver', \ 'coc-prettier', \ 'coc-yaml', \ 'coc-json', \ 'coc-git', \ 'coc-pyright', \ 'coc-pairs', \ 'coc-prisma', \ 'coc-sh', \ 'coc-typos', \ 'coc-docker', \ 'coc-go', \ 'coc-html', \ 'coc-sql', \ 'coc-toml', \ ] if isdirectory('./node_modules') && isdirectory('./node_modules/prettier') let g:coc_global_extensions += ['coc-prettier'] endif if isdirectory('./node_modules') && isdirectory('./node_modules/eslint') let g:coc_global_extensions += ['coc-eslint'] endif " Make to accept selected completion item or notify coc.nvim to format " u breaks current undo, please make your own choice. inoremap coc#pum#visible() ? coc#pum#confirm() \: "\u\\=coc#on_enter()\" " Diagnostic list nnoremap d :CocList diagnostics " Symbols list nnoremap s :CocList -I symbols " Code actions nmap do (coc-codeaction) " Rename current world nmap rn (coc-rename) " Use K to show documentation in preview window. nnoremap K :call ShowDocumentation() function! ShowDocumentation() if CocAction('hasProvider', 'hover') call CocActionAsync('doHover') else call feedkeys('K', 'in') endif endfunction " Highlight the symbol and its references when holding the cursor. autocmd CursorHold * silent call CocActionAsync('highlight') " Remap keys for applying codeAction to the current buffer. nmap ac (coc-codeaction) " Apply AutoFix to problem on the current line. nmap qf (coc-fix-current) " GoTo code navigation. nmap gd (coc-definition) nmap gy (coc-type-definition) nmap gi (coc-implementation) nmap gr (coc-references) """"" "--- TMUX/Clipboard fixes set t_Co=256 set t_ut= " Set Vim-specific sequences for RGB colors " Fixes 'termguicolors' usage in vim+tmux " :h xterm-true-color let &t_8f = "\[38;2;%lu;%lu;%lum" let &t_8b = "\[48;2;%lu;%lu;%lum" " Enables 24-bit RGB color in the terminal if has('termguicolors') if empty($COLORTERM) || $COLORTERM =~# 'truecolor\|24bit' set termguicolors endif endif " Use system clipboard to get buffers synced between TMUX and VIM if has('clipboard') && has('vim_starting') " set clipboard& clipboard+=unnamedplus set clipboard& clipboard^=unnamed,unnamedplus endif if exists('##TextYankPost') augroup BlinkClipboardIntegration autocmd! autocmd TextYankPost * if v:event.operator is 'y' && v:event.regname is '' | execute 'OSCYankReg "' | endif augroup END endif """" "--- Treesitter configuration lua <