Skip to content

Instantly share code, notes, and snippets.

@tanay-pingalkar
Last active August 5, 2021 07:21
Show Gist options
  • Save tanay-pingalkar/0561c8f1514da129b5c1b4e5f33f000a to your computer and use it in GitHub Desktop.
Save tanay-pingalkar/0561c8f1514da129b5c1b4e5f33f000a to your computer and use it in GitHub Desktop.
syntax enable
let g:rustfmt_autosave = 1
let g:airline#extensions#tabline#enabled = 1
set relativenumber
let g:airline#extensions#tabline#left_sep = ' '
let g:airline#extensions#tabline#left_alt_sep = '|'
let g:airline#extensions#tabline#formatter = 'default'
let g:NERDTreeWinSize=20
set guifont=DroidSansMono\ Nerd\ Font\ 11
set encoding=utf8
set ttymouse=sgr
set mouse=a
let g:NERDTreeMouseMode=3
nnoremap <leader>n :NERDTreeFocus<CR>
nnoremap <C-n> :NERDTree<CR>
nnoremap <C-t> :NERDTreeToggle<CR>
nnoremap <C-f> :NERDTreeFind<CR>
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)
nnoremap <silent> gh :call <SID>show_documentation()<CR>
function! s:show_documentation()
if (index(['vim','help'], &filetype) >= 0)
execute 'h '.expand('<cword>')
elseif (coc#rpc#ready())
call CocActionAsync('doHover')
else
execute '!' . &keywordprg . " " . expand('<cword>')
endif
endfunction
autocmd CursorHold * silent call CocActionAsync('highlight')
call plug#begin()
Plug 'rust-lang/rust.vim'
Plug 'preservim/nerdtree'
Plug 'ryanoasis/vim-devicons'
Plug 'frazrepo/vim-rainbow'
Plug 'dracula/vim', { 'as': 'dracula' }
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
call plug#end()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment