When editing XML files, settings for HTML automatically be inherited.
Settings should be overridable by custom settings (for example I can clear default_attributes by adding 'xml': { 'default_attributes': {} } to g:user_emmet_settings.
But I cannot override empty_elements for XML files by user_emmet_settings, this forces meta<C-y>, to be always expanded into <meta />.
I'm not sure but I think the line below is one of the cause:
The logic for HTML is used for XML files, but it unconditionally uses settings.html.*.
I temporarily changed the line as below, and meta<C-y>, is expanded into <meta></meta> as I expected.
When editing XML files, settings for HTML automatically be inherited. Settings should be overridable by custom settings (for example I can clear
default_attributes
by adding'xml': { 'default_attributes': {} }
tog:user_emmet_settings
.But I cannot override
empty_elements
for XML files byuser_emmet_settings
, this forcesmeta<C-y>,
to be always expanded into<meta />
.I'm not sure but I think the line below is one of the cause:
https://github.com/mattn/emmet-vim/blob/3fb134b503eeb3fc6cf91a7fd9716a7fb7dbeed6/autoload/emmet/lang/html.vim#L591
The logic for HTML is used for XML files, but it unconditionally uses
settings.html.*
. I temporarily changed the line as below, andmeta<C-y>,
is expanded into<meta></meta>
as I expected.I think most of (but not all) appearance of
settings.html.foo
in the file should be replaced withemmet#getResource(type, 'foo', settings.html.foo)
.