Skip to content

Instantly share code, notes, and snippets.

@lucasraziel
Created March 18, 2020 19:45
Show Gist options
  • Save lucasraziel/4c9ed6839401792ef4342ed659a419a1 to your computer and use it in GitHub Desktop.
Save lucasraziel/4c9ed6839401792ef4342ed659a419a1 to your computer and use it in GitHub Desktop.
"#tabs
" " - Two spaces wide
set tabstop=2
set mouse=a
set ttymouse=xterm
set softtabstop=2
" " - Expand them all
set expandtab
" " - Indent by 2 spaces by default
set shiftwidth=2
" " turn off mouse
" set mouse=""
""" Leader #leader
let g:mapleader=','
"" Format Options #format-options
set formatoptions=tcrq
set textwidth=80
call plug#begin()
Plug 'dracula/vim', { 'as': 'dracula' }
Plug 'scrooloose/nerdtree'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'terryma/vim-multiple-cursors'
Plug 'tpope/vim-surround'
Plug 'editorconfig/editorconfig-vim'
Plug 'airblade/vim-gitgutter'
Plug 'jiangmiao/auto-pairs'
Plug 'scrooloose/nerdcommenter'
Plug 'dense-analysis/ale'
"------------------------ COC ------------------------
""" coc for tslinting, auto complete and prettier
Plug 'neoclide/coc.nvim', {'do': 'yarn install --frozen-lockfile'}
inoremap <silent><expr> <c-space> coc#refresh()
" coc extensions
let g:coc_global_extensions = ['coc-eslint', 'coc-emmet', 'coc-css', 'coc-html', 'coc-json', 'coc-yank', 'coc-prettier','coc-tsserver','coc-python']
" "------------------------ VIM TSX ------------------------
" " by default, if you open tsx file, neovim does not show syntax colors
" vim-tsx will do all the coloring for jsx in the .tsx file
Plug 'ianks/vim-tsx'
" "------------------------ VIM TSX ------------------------
" " by default, if you open tsx file, neovim does not show syntax colors
" " typescript-vim will do all the coloring for typescript keywords
Plug 'leafgarland/typescript-vim'
" "------------------------ THEME ------------------------
" " most importantly you need a good color scheme to write good code :D
""Plug 'dikiaap/minimalist'
call plug#end()
" " == VIMPLUG END ================================
" " == AUTOCMD ================================
" " by default .ts file are not identified as typescript and .tsx files
" are not
" " identified as typescript react file, so add following
au BufNewFile,BufRead *.ts setlocal filetype=typescript
au BufNewFile,BufRead *.tsx setlocal filetype=typescript.tsx
" " == AUTOCMD END ================================
call plug#end()
map <C-n> :NERDTreeToggle<CR>
let NERDTreeShowHidden=1
set number
set laststatus=2
set statusline+=%#warningmsg#
set statusline+=%{coc#status()}
set statusline+=%*
"let g:syntastic_always_populate_loc_list = 1
""let g:syntastic_auto_loc_list=5
"let g:syntastic_loc_list_height = 5
""let g:syntastic_check_on_open = 1
"let g:syntastic_check_on_wq = 1
""let g:syntastic_javascript_checkers = ['eslint']
"let g:syntastic_error_symbol = '❌'
""let g:syntastic_style_error_symbol = '⁉️'
"let g:syntastic_warning_symbol = '⚠️'
""let g:syntastic_style_warning_symbol = '💩'
"highlight link SyntasticErrorSign SignColumn
""highlight link SyntasticWarningSign SignColumn
"highlight link SyntasticStyleErrorSign SignColumn
""highlight link SyntasticStyleWarningSign SignColumn
"let g:syntastic_javascript_eslint_exe = 'yarn lint -
""
let g:ale_fixers = ['eslint','prettier']
let g:ale_fix_on_save=1
let g:ale_set_balloons = 1
map <C-i> :ALEHover<CR>
map <F7> :lopen<CR>
map <F12> :ALEGoToDefinitionInVSplit<CR>
map <F2> :lcl<CR>
colorscheme dracula
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment