aboutsummaryrefslogtreecommitdiff
path: root/.vim/after/plugin
diff options
context:
space:
mode:
authorGuangxiong Lin <[email protected]>2023-10-25 00:33:35 +0800
committerGuangxiong Lin <[email protected]>2023-10-25 00:33:35 +0800
commitf7311e2613efd621558cfe7ee267d98e0e02841e (patch)
tree84e712a7fafc58dcd57fb5e5eb0e8af73b3f98dc /.vim/after/plugin
parentc22e593950e9cbbcb58d6c2591bec3da363a4997 (diff)
downloaddotfiles-f7311e2613efd621558cfe7ee267d98e0e02841e.tar.gz
dotfiles-f7311e2613efd621558cfe7ee267d98e0e02841e.tar.bz2
dotfiles-f7311e2613efd621558cfe7ee267d98e0e02841e.zip
Add typescript-language-server
Diffstat (limited to '.vim/after/plugin')
-rw-r--r--.vim/after/plugin/lsp.vim8
1 files changed, 8 insertions, 0 deletions
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