Kaynağa Gözat

Whatever was in my vim config

Thomas Dy 5 yıl önce
ebeveyn
işleme
6d9cd74bd7
1 değiştirilmiş dosya ile 19 ekleme ve 0 silme
  1. 19 0
      .vim/init.vim

+ 19 - 0
.vim/init.vim

@@ -14,6 +14,7 @@ Plug 'EinfachToll/DidYouMean'
 Plug 'diepm/vim-rest-console'
 Plug 'idanarye/vim-merginal'
 Plug 'vimwiki/vimwiki'
+Plug 'neomake/neomake'
 
 Plug 'vim-scripts/dbext.vim', {'for': 'sql'}
 Plug 'cespare/vim-toml'
@@ -44,6 +45,8 @@ endif
 if executable('npm')
   Plug 'pangloss/vim-javascript'
   Plug 'mxw/vim-jsx'
+  Plug 'leafgarland/typescript-vim'
+"  Plug 'mhartington/nvim-typescript', { 'do': 'bash install.sh' }
 endif
 
 if executable('qml')
@@ -65,6 +68,22 @@ let g:airline_right_sep=''
 
 let g:vimwiki_list = [{'path': '~/.root/home/wiki'}]
 
+let s:node_modules_path = system('yarn bin')
+let s:node_modules_path = strpart(s:node_modules_path, 0, len(s:node_modules_path) - 1)
+let g:neomake_javascript_enabled_makers = ['eslint']
+let g:neomake_javascript_eslint_exe = s:node_modules_path.'/eslint'
+let g:neomake_typescript_enabled_makers = ['tslint']
+let g:neomake_typescript_tslint_exe = s:node_modules_path.'/tslint'
+call neomake#configure#automake('w')
+
+let g:nvim_typescript#javascript_support = 1
+
+" Or map each action separately
+nnoremap <silent> K :TSDoc<CR>
+nnoremap <silent> gd :TSDef<CR>
+nnoremap <silent> <F2> :TSRename<CR>
+nnoremap <Leader>li :TSImport<CR>
+
 let g:vrc_curl_opts = {
       \ '-L': '',
       \ '-i': '',