Compare commits
2 Commits
3c9e020e8e
...
687272ed26
Author | SHA1 | Date | |
---|---|---|---|
|
687272ed26 | ||
|
c7f43a32b5 |
25
.vimrc
25
.vimrc
@ -38,12 +38,6 @@ Plug 'Shougo/defx.nvim'
|
|||||||
Plug 'roxma/nvim-yarp'
|
Plug 'roxma/nvim-yarp'
|
||||||
Plug 'roxma/vim-hug-neovim-rpc'
|
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 'vim-airline/vim-airline'
|
||||||
Plug 'kien/tabman.vim'
|
Plug 'kien/tabman.vim'
|
||||||
|
|
||||||
@ -321,6 +315,25 @@ if executable('rust-analyzer')
|
|||||||
\ })
|
\ })
|
||||||
endif
|
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
|
" auto completer
|
||||||
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
|
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
|
||||||
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
|
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
|
||||||
|
Loading…
Reference in New Issue
Block a user