Skip to content

Instantly share code, notes, and snippets.

@fachryansyah
Last active November 20, 2021 19:07
Show Gist options
  • Save fachryansyah/4f892ab94a5977e229f28e760863616b to your computer and use it in GitHub Desktop.
Save fachryansyah/4f892ab94a5977e229f28e760863616b to your computer and use it in GitHub Desktop.
init.vim
call plug#begin('~/.vim/plugged')
" leave some space in between
Plug 'preservim/nerdtree'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'pineapplegiant/spaceduck', { 'branch': 'main' }
Plug 'nvim-lualine/lualine.nvim'
" If you want to have icons in your statusline choose one of these
Plug 'kyazdani42/nvim-web-devicons'
Plug 'ryanoasis/vim-devicons'
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'junegunn/fzf.vim'
call plug#end()
"Changing default NERDTree arrows
let g:NERDTreeDirArrowExpandable = '▸'
let g:NERDTreeDirArrowCollapsible = '▾'
nmap <silent> gd <Plug>(coc-definition)
nmap <silent> gy <Plug>(coc-type-definition)
nmap <silent> gr <Plug>(coc-references)
nmap <silent> [g <Plug>(coc-diagnostic-prev)
nmap <silent> ]g <Plug>(coc-diagnostic-next)
nnoremap <silent> <space>s :<C-u>CocList -I symbols<cr>
nnoremap <silent> <space>d :<C-u>CocList diagnostics<cr>
nmap <leader>do <Plug>(coc-codeaction)
nmap <leader>rn <Plug>(coc-rename)
nnoremap <C-t> :NERDTreeToggle<CR>
let g:coc_global_extensions = [
\ 'coc-tsserver',
\ 'coc-json',
\ 'coc-css',
\ 'coc-eslint',
\ 'coc-prettier'
\ ]
if exists('+termguicolors')
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
set termguicolors
endif
colorscheme spaceduck
lua << END
require'lualine'.setup()
END
set encoding=UTF-8
nmap <silent> ff :<C-u>Files<cr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment