Compare commits

..

No commits in common. "687272ed267798de03fa00ed2d258a9b3a8e97ef" and "3c9e020e8ebc252df79ddd5ce36b0af2196f69e8" have entirely different histories.

25
.vimrc
View File

@ -38,6 +38,12 @@ Plug 'Shougo/defx.nvim'
Plug 'roxma/nvim-yarp'
Plug 'roxma/vim-hug-neovim-rpc'
" LSP
" JS/TS require
" npm install -g typescript typescript-language-server
Plug 'ryanolsonx/vim-lsp-javascript'
Plug 'ryanolsonx/vim-lsp-typescript'
Plug 'vim-airline/vim-airline'
Plug 'kien/tabman.vim'
@ -315,25 +321,6 @@ if executable('rust-analyzer')
\ })
endif
" LSP
" JS/TS require
" npm install -g typescript typescript-language-server
if executable('typescript-language-server')
au User lsp_setup call lsp#register_server({
\ 'name': 'javascript support using typescript-language-server',
\ 'cmd': {server_info->[&shell, &shellcmdflag, 'typescript-language-server --stdio']},
\ 'root_uri':{server_info->lsp#utils#path_to_uri(lsp#utils#find_nearest_parent_file_directory(lsp#utils#get_buffer_path(), 'package.json'))},
\ 'whitelist': ['javascript', 'javascript.jsx'],
\ })
au User lsp_setup call lsp#register_server({
\ 'name': 'typescript support using typescript-language-server',
\ 'cmd': {server_info->[&shell, &shellcmdflag, 'typescript-language-server --stdio']},
\ 'root_uri':{server_info->lsp#utils#path_to_uri(lsp#utils#find_nearest_parent_file_directory(lsp#utils#get_buffer_path(), 'tsconfig.json'))},
\ 'whitelist': ['typescript', 'typescript.tsx', 'typescriptreact'],
\ })
endif
" auto completer
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"