From 4b5bc96115a1847869427c878f56b044138316c4 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Tue, 28 May 2019 17:07:12 +0800 Subject: [PATCH] Add typescript support --- after/ftplugin/typescript.vim | 18 ++++++++++++++++++ vimrc | 4 ++++ 2 files changed, 22 insertions(+) create mode 100644 after/ftplugin/typescript.vim diff --git a/after/ftplugin/typescript.vim b/after/ftplugin/typescript.vim new file mode 100644 index 0000000..1656b73 --- /dev/null +++ b/after/ftplugin/typescript.vim @@ -0,0 +1,18 @@ +nnoremap gd + + +let g:tsuquyomi_disable_quickfix = 1 + +let g:ale_linters = { +\ 'typescript': ['tsserver'], +\} + +call deoplete#custom#option('sources', { + \ 'typescript': ['ale', 'buffer', 'file', 'around'], + \}) + + +call deoplete#custom#source('ale', 'rank', 999) +call deoplete#custom#source('ale', 'input_pattern', '[^. *\t]\.\w*') + +autocmd FileType typescript setlocal balloonexpr=tsuquyomi#balloonexpr() diff --git a/vimrc b/vimrc index 7bd607a..9dec29c 100644 --- a/vimrc +++ b/vimrc @@ -142,6 +142,10 @@ Plug 'idanarye/vim-vebugger', { 'for': 'python' } " scala Plug 'derekwyatt/vim-scala', { 'for': 'scala' } +" typescript +Plug 'leafgarland/typescript-vim', { 'for': 'typescript' } +Plug 'Quramy/tsuquyomi', { 'for': 'typescript' } + " color and beauty Plug 'tomasiser/vim-code-dark' Plug 'romainl/Apprentice'