check server_name (#1315)

This commit is contained in:
mattn
2022-05-23 02:01:33 +09:00
committed by GitHub
parent c075e157fc
commit 1e1a0981a7

View File

@@ -411,7 +411,7 @@ endfunction
function! s:ensure_start(buf, server_name, cb) abort
let l:path = lsp#utils#get_buffer_path(a:buf)
if lsp#utils#is_remote_uri(l:path)
if lsp#utils#is_remote_uri(l:path) || !has_key(s:servers, a:server_name)
let l:msg = s:new_rpc_error('ignoring start server due to remote uri', { 'server_name': a:server_name, 'uri': l:path})
call lsp#log(l:msg)
call a:cb(l:msg)