From f7311e2613efd621558cfe7ee267d98e0e02841e Mon Sep 17 00:00:00 2001 From: Guangxiong Lin Date: Wed, 25 Oct 2023 00:33:35 +0800 Subject: Add typescript-language-server --- .vim/after/plugin/lsp.vim | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to '.vim/after/plugin') diff --git a/.vim/after/plugin/lsp.vim b/.vim/after/plugin/lsp.vim index 04a9647..0060414 100644 --- a/.vim/after/plugin/lsp.vim +++ b/.vim/after/plugin/lsp.vim @@ -84,6 +84,14 @@ if executable('rust-analyzer') \ }) endif +if executable('typescript-language-server') + au User lsp_setup call lsp#register_server({ + \ 'name': 'typescript-language-server', + \ 'cmd': {server_info->['typescript-language-server', '--stdio']}, + \ 'allowlist': ['javascript', 'typescript', 'typescriptreact', 'typescript.tsx'], + \ }) +endif + function! s:on_lsp_buffer_enabled() abort setlocal omnifunc=lsp#complete setlocal nocscopetag -- cgit v1.2.3