aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYasuhiro Matsumoto <mattn.jp@gmail.com>2020-01-30 00:00:21 +0900
committerYasuhiro Matsumoto <mattn.jp@gmail.com>2020-01-30 00:00:21 +0900
commit08e6ed76dea1b22d90c9e6ecbdb4a912166396e8 (patch)
treecdea4a3d519df51269dddac30c2b8097d56a2e2b
parent1c00269778adf69817e3a4114ede7f21dffd8b1c (diff)
downloadvim-lsp-settings-08e6ed76dea1b22d90c9e6ecbdb4a912166396e8.tar.gz
vim-lsp-settings-08e6ed76dea1b22d90c9e6ecbdb4a912166396e8.tar.bz2
vim-lsp-settings-08e6ed76dea1b22d90c9e6ecbdb4a912166396e8.zip
Fix completion
-rw-r--r--autoload/lsp_settings.vim1
-rw-r--r--plugin/lsp_settings.vim3
2 files changed, 3 insertions, 1 deletions
diff --git a/autoload/lsp_settings.vim b/autoload/lsp_settings.vim
index 08bc138..0e11c0a 100644
--- a/autoload/lsp_settings.vim
+++ b/autoload/lsp_settings.vim
@@ -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
diff --git a/plugin/lsp_settings.vim b/plugin/lsp_settings.vim
index 58aa100..8823350 100644
--- a/plugin/lsp_settings.vim
+++ b/plugin/lsp_settings.vim
@@ -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