This commit is contained in:
Yasuhiro Matsumoto
2016-11-23 23:41:57 +09:00
parent 4eca5f5693
commit 44906fb16e

View File

@@ -374,10 +374,9 @@ function! emmet#getFileType(...) abort
let type = '' let type = ''
if has_key(s:emmet_settings, &filetype) if has_key(s:emmet_settings, &filetype)
return &filetype let type = &filetype
else else
let types = split(&filetype, '\.') let types = split(&filetype, '\.')
endif
for part in types for part in types
if emmet#lang#exists(part) if emmet#lang#exists(part)
let type = part let type = part
@@ -394,6 +393,7 @@ function! emmet#getFileType(...) abort
break break
endif endif
endfor endfor
endif
if type ==# 'html' if type ==# 'html'
let pos = emmet#util#getcurpos() let pos = emmet#util#getcurpos()
let type = synIDattr(synID(pos[1], pos[2], 1), 'name') let type = synIDattr(synID(pos[1], pos[2], 1), 'name')