call plug#begin()
Plug 'arrufat/vala.vim'
Plug 'benmills/vimux'
Plug 'dradtke/vim-dap'
Plug 'hashivim/vim-terraform'
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'junegunn/fzf.vim'
Plug 'rust-lang/rust.vim'
Plug 'scrooloose/nerdtree'
Plug 'thomd/vim-wasabi-colorscheme'
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-sensible'
Plug 'jvirtanen/vim-hcl'
if has('nvim')
Plug 'nvim-lua/popup.nvim'
Plug 'nvim-lua/plenary.nvim'
endif
if has('nvim-0.5')
Plug 'gfanto/fzf-lsp.nvim'
Plug 'neovim/nvim-lspconfig'
Plug 'nvim-telescope/telescope.nvim'
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
Plug 'jlanzarotta/bufexplorer'
endif
call plug#end()
set hidden
set modeline
set nu
set completeopt=menuone,noinsert,noselect
set tabstop=4 shiftwidth=4
nmap <Leader>ff :FZF<cr>
nmap <Leader>nt :NERDTreeToggle<cr>
nmap <Leader>nf :NERDTreeFind<cr>
nmap <Leader>nh :set nohls<cr>
au FileType go setlocal noexpandtab tabstop=4 shiftwidth=4
au FileType go call s:set_make_go()
au FileType go command! Imports call s:go_imports()
au FileType html setlocal expandtab tabstop=2 shiftwidth=2
au FileType json setlocal expandtab tabstop=2 shiftwidth=2
au FileType javascript setlocal expandtab tabstop=4 shiftwidth=4
silent! colorscheme wasabi256
highlight! link NonText NONE
function! s:set_make_go() abort
let l:dir = expand('%:p:h')
execute 'setlocal makeprg=go\ build\ '.l:dir
endfunction
function! s:go_imports() abort
execute '!goimports -w '.expand('%')
endfunction