Fix completion

This commit is contained in:
Yasuhiro Matsumoto
2020-01-30 00:00:21 +09:00
parent 1c00269778
commit 08e6ed76de
2 changed files with 3 additions and 1 deletions

View File

@@ -122,6 +122,7 @@ function! lsp_settings#complete_install(arglead, cmdline, cursorpos) abort
call remove(l:settings, '$schema')
let l:ft = tolower(get(split(&filetype, '\.'), 0, ''))
let l:ft = empty(l:ft) ? '_' : l:ft
if !has_key(l:settings, l:ft)
return []
endif

View File

@@ -42,7 +42,8 @@ function! s:executable(cmd) abort
endfunction
function! s:vim_lsp_installer(ft, ...) abort
let l:ft = tolower(split(a:ft, '\.')[0])
let l:ft = tolower(get(split(a:ft, '\.'), 0, ''))
let l:ft = empty(l:ft) ? '_' : l:ft
if !has_key(s:settings, l:ft)
return []
endif