[WIP] styled

This commit is contained in:
Yasuhiro Matsumoto
2019-11-13 16:28:12 +09:00
parent 5f559fae12
commit 84a0388827
3 changed files with 8 additions and 4 deletions

View File

@@ -396,6 +396,8 @@ function! emmet#getFileType(...) abort
let type = 'html'
elseif type =~? '^jsx'
let type = 'jsx'
elseif type =~? '^jsTemplateString'
let type = 'css-block'
elseif (type =~? '^js\w' || type =~? '^javascript') && !(&filetype =~? 'jsx')
let type = 'javascript'
elseif type =~? '^tsx'

View File

@@ -15,6 +15,7 @@ function! emmet#lang#type(type) abort
let settings = emmet#getSettings()
while base != ''
for b in split(base, '\.')
let b = substitute(b, '-.*', '', '')
if emmet#lang#exists(b)
return b
endif

View File

@@ -13,10 +13,11 @@ function! emmet#lang#css#parseIntoTree(abbr, type) abort
let prefix = 0
let value = ''
let indent = emmet#getIndentation(type)
let aliases = emmet#getResource(type, 'aliases', {})
let snippets = emmet#getResource(type, 'snippets', {})
let use_pipe_for_cursor = emmet#getResource(type, 'use_pipe_for_cursor', 1)
let ftype = substitute(type, '-.*', '', '')
let indent = emmet#getIndentation(ftype)
let aliases = emmet#getResource(ftype, 'aliases', {})
let snippets = emmet#getResource(ftype, 'snippets', {})
let use_pipe_for_cursor = emmet#getResource(ftype, 'use_pipe_for_cursor', 1)
let root = emmet#newNode()