Skip to content

Commit

Permalink
vtsls is also available for vue language tools
Browse files Browse the repository at this point in the history
  • Loading branch information
tsukkee authored and mattn committed May 30, 2024
1 parent a962acf commit 69a90d9
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions settings/volar-server.vim
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,16 @@ function! s:on_lsp_buffer_enabled() abort

" check typescript-language-server
let ts_server_dir = lsp_settings#servers_dir() .. '/typescript-language-server'
if !isdirectory(ts_server_dir)
call lsp_settings#utils#warning('Please install typescript-language-server to enable Vue support')
let vtsls_server_dir = lsp_settings#servers_dir() .. '/vtsls'
if !isdirectory(ts_server_dir) && !isdirectory(vtsls_server_dir)
call lsp_settings#utils#warning('Please install typescript-language-server or vtsls to enable Vue support')
endif

if !exists('g:lsp_settings_filetype_vue') ||
\ index(g:lsp_settings_filetype_vue, 'volar-server') == -1 ||
\ index(g:lsp_settings_filetype_vue, 'typescript-language-server') == -1
call lsp_settings#utils#warning('Both ''volar-server'' and ''typescript-language-server'' should be included in g:lsp_settings_filetype_vue to enable Vue support')
\ (index(g:lsp_settings_filetype_vue, 'typescript-language-server') == -1 &&
\ index(g:lsp_settings_filetype_vue, 'vtsls') == -1)
call lsp_settings#utils#warning('''volar-server'' and one of ''typescript-language-server'' and ''vtsls'' should be included in g:lsp_settings_filetype_vue to enable Vue support')
endif
endfunction

Expand Down

0 comments on commit 69a90d9

Please sign in to comment.