Last active
May 30, 2020 06:05
-
-
Save mnuddindev/b0267ffc4660d6825fe661e6ed0eead1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set rtp+=~/.vim | |
| set shell=/bin/bash | |
| call plug#begin("~/.vim/plugged") | |
| Plug 'fatih/vim-go' | |
| Plug 'fatih/molokai' | |
| Plug 'pR0Ps/molokai-dark' | |
| Plug 'mattn/emmet-vim' | |
| Plug 'tpope/vim-surround' | |
| Plug 'Yggdroot/indentLine' | |
| Plug 'itchyny/lightline.vim' | |
| Plug 'maximbaz/lightline-ale' | |
| Plug 'tpope/vim-fugitive' | |
| Plug 'neoclide/coc.nvim', {'branch': 'release'} | |
| "Plug 'neoclide/vim-jsx-improve' | |
| Plug 'preservim/nerdcommenter' | |
| Plug 'scrooloose/nerdtree' | |
| Plug 'jiangmiao/auto-pairs' | |
| Plug 'pangloss/vim-javascript' | |
| Plug 'mxw/vim-jsx' | |
| Plug 'yuezk/vim-js' | |
| "Plug 'maxmellon/vim-jsx-pretty' | |
| "Plug 'prettier/vim-prettier', { 'do': 'yarn install', 'for': ['javascript', 'typescript', 'css', 'less', 'scss', 'json', 'graphql', 'markdown', 'vue', 'yaml', 'html'] } | |
| "Plug 'w0rp/ale' | |
| call plug#end() | |
| " Color Scheme Settings | |
| let g:rehash256 = 1 | |
| colorscheme molokai-dark | |
| let g:molokai_original = 1 | |
| syntax enable | |
| " Rainbow | |
| let g:rainbow_active = 1 | |
| let mapleader=';' | |
| " Scroll Configuration | |
| set mouse=a | |
| map <ScrollWheelUp> <C-Y> | |
| map <ScrollWheelDown> <C-E> | |
| " Set Configuration | |
| filetype on | |
| filetype plugin on | |
| filetype indent on | |
| set number | |
| set showtabline=2 | |
| set guioptions-=e | |
| set tabstop=4 | |
| set shiftwidth=4 | |
| set expandtab | |
| set laststatus=2 | |
| set encoding=utf-8 | |
| set autoindent | |
| set incsearch | |
| set hlsearch | |
| set showcmd | |
| set noswapfile | |
| set nobackup | |
| set nocursorcolumn | |
| set cursorline | |
| set hidden | |
| set cmdheight=2 | |
| set updatetime=500 | |
| set shortmess+=c | |
| set signcolumn=yes | |
| set foldmethod=manual | |
| " Undo File | |
| if has('persistent_undo') | |
| set undofile | |
| set undodir=~/.config/nvim/tmp/undo// | |
| endif | |
| " IndentLine Configuration | |
| let g:indentLine_bgcolor_term = 202 | |
| let g:indentLine_bgcolor_gui = '#FF5F00' | |
| " Vim Prettier | |
| "let g:prettier#autoformat = 0 | |
| "autocmd BufWritePre *.js,*.jsx,*.mjs,*.ts,*.tsx,*.css,*.less,*.scss,*.json,*.graphql,*.md,*.vue,*.yaml,*.html PrettierAsync | |
| " ALE For React | |
| "let g:ale_linters = { | |
| " \ 'javascript': ['eslint'], | |
| " \} | |
| "let g:ale_fixers = { | |
| " \ 'javascript': ['prettier', 'eslint'] | |
| " \ } | |
| "let g:ale_fix_on_save = 1 | |
| "nmap <leader>d <Plug>(ale_fix) | |
| " Vim LightLine Configuration | |
| let g:lightline = { | |
| \ 'colorscheme': 'one', | |
| \ 'active': { | |
| \ 'left':[ [ 'mode', 'paste' ], | |
| \ [ 'gitbranch', 'readonly', 'filename', 'modified' ] | |
| \ ] | |
| \ }, | |
| \ 'component': { | |
| \ 'lineinfo': ' %3l:%-2v', | |
| \ }, | |
| \ 'component_function': { | |
| \ 'gitbranch': 'fugitive#head', | |
| \ } | |
| \ } | |
| let g:lightline.separator = { | |
| \ 'left': '', 'right': '' | |
| \} | |
| let g:lightline.subseparator = { | |
| \ 'left': '', 'right': '' | |
| \} | |
| let g:lightline.tabline = { | |
| \ 'left': [ ['tabs'] ], | |
| \ 'right': [ ['close'] ] | |
| \ } | |
| let g:lightline.component_expand = { | |
| \ 'linter_checking': 'lightline#ale#checking', | |
| \ 'linter_infos': 'lightline#ale#infos', | |
| \ 'linter_warnings': 'lightline#ale#warnings', | |
| \ 'linter_errors': 'lightline#ale#errors', | |
| \ 'linter_ok': 'lightline#ale#ok', | |
| \ } | |
| let g:lightline.component_type = { | |
| \ 'linter_checking': 'right', | |
| \ 'linter_infos': 'right', | |
| \ 'linter_warnings': 'warning', | |
| \ 'linter_errors': 'error', | |
| \ 'linter_ok': 'right', | |
| \ } | |
| let g:lightline#ale#indicator_checking = "\uf110" | |
| let g:lightline#ale#indicator_infos = "\uf129" | |
| let g:lightline#ale#indicator_warnings = "⚡" | |
| let g:lightline#ale#indicator_errors = "●" | |
| let g:lightline#ale#indicator_ok = "\uf00c" | |
| "NERDTree Seettings | |
| let g:NERDTreeDirArrowExpandable = '▸' | |
| let g:NERDTreeDirArrowCollapsible = '▾' | |
| map <leader>j :NERDTreeToggle<CR> | |
| " Coc Configuration | |
| 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> to trigger completion. | |
| inoremap <silent><expr> <c-space> coc#refresh() | |
| " Use `[c` and `]c` to 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 U to show documentation in preview window | |
| nnoremap <silent> U :call <SID>show_documentation()<CR> | |
| " 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) | |
| " Show all diagnostics | |
| nnoremap <silent> <space>a :<C-u>CocList diagnostics<cr> | |
| " Manage extensions | |
| nnoremap <silent> <space>e :<C-u>CocList extensions<cr> | |
| " Show commands | |
| nnoremap <silent> <space>c :<C-u>CocList commands<cr> | |
| " Find symbol of current document | |
| nnoremap <silent> <space>o :<C-u>CocList outline<cr> | |
| " Search workspace symbols | |
| nnoremap <silent> <space>s :<C-u>CocList -I symbols<cr> | |
| " Do default action for next item. | |
| nnoremap <silent> <space>j :<C-u>CocNext<CR> | |
| " Do default action for previous item. | |
| nnoremap <silent> <space>k :<C-u>CocPrev<CR> | |
| " Resume latest coc list | |
| nnoremap <silent> <space>p :<C-u>CocListResume<CR> | |
| " vim-go | |
| let g:go_fmt_command = "goimports" | |
| let g:go_autodetect_gopath = 1 | |
| let g:go_list_type = "quickfix" | |
| let g:go_highlight_types = 1 | |
| let g:go_highlight_fields = 1 | |
| let g:go_highlight_functions = 1 | |
| let g:go_highlight_function_calls = 1 | |
| let g:go_highlight_extra_types = 1 | |
| let g:go_highlight_generate_tags = 1 | |
| map <C-b> :GoBuild<CR> | |
| map <C-r> :GoRun<CR> | |
| map <C-s> :wall<CR> | |
| " Emmet Settinf | |
| let g:user_emmet_leader_key=',' | |
| let g:user_emmet_settings = { | |
| \ 'javascript.jsx' : { | |
| \ 'extends' : 'jsx', | |
| \ }, | |
| \} | |
| let g:coc_global_extensions = ['coc-tsserver', 'coc-css', 'coc-highlight', 'coc-html'] | |
| let g:go_def_mapping_enabled = 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment