Add JS support in vim
This commit is contained in:
parent
5671bc11c2
commit
07ec31112a
2 changed files with 12 additions and 0 deletions
|
@ -11,6 +11,7 @@ Plug 'airblade/vim-gitgutter'
|
|||
Plug 'cespare/vim-toml'
|
||||
Plug 'Chiel92/vim-autoformat'
|
||||
Plug 'drmingdrmer/vim-toggle-quickfix'
|
||||
Plug 'editorconfig/editorconfig-vim'
|
||||
Plug 'godlygeek/tabular'
|
||||
Plug 'https://github.com/cyplo/vim-colors-solarized.git'
|
||||
Plug 'junegunn/fzf.vim'
|
||||
|
@ -25,6 +26,8 @@ Plug 'prabirshrestha/vim-lsp'
|
|||
Plug 'roxma/nvim-yarp'
|
||||
Plug 'roxma/vim-hug-neovim-rpc'
|
||||
Plug 'rust-lang/rust.vim'
|
||||
Plug 'ryanolsonx/vim-lsp-javascript'
|
||||
Plug 'ryanolsonx/vim-lsp-typescript'
|
||||
Plug 'scrooloose/nerdtree'
|
||||
Plug 'timonv/vim-cargo'
|
||||
Plug 'tpope/vim-cucumber'
|
||||
|
|
|
@ -24,6 +24,15 @@ au User lsp_setup call lsp#register_server({
|
|||
\ 'whitelist': ['rust'],
|
||||
\ })
|
||||
|
||||
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_directory(lsp#utils#get_buffer_path(), '.git/..'))},
|
||||
\ 'whitelist': ['javascript', 'javascript.jsx', 'typescript', 'typescript.tsx'],
|
||||
\ })
|
||||
endif
|
||||
|
||||
let g:lsp_signs_enabled = 1
|
||||
let g:lsp_diagnostics_echo_cursor = 1
|
||||
|
||||
|
|
Loading…
Reference in a new issue