summaryrefslogtreecommitdiffstats
path: root/autoload
diff options
context:
space:
mode:
Diffstat (limited to 'autoload')
-rw-r--r--autoload/dart.vim10
-rw-r--r--autoload/xml/aria.vim81
-rw-r--r--autoload/xml/html5.vim14
3 files changed, 69 insertions, 36 deletions
diff --git a/autoload/dart.vim b/autoload/dart.vim
index 2ff55cb6..0e8fb525 100644
--- a/autoload/dart.vim
+++ b/autoload/dart.vim
@@ -22,6 +22,7 @@ function! dart#fmt(q_args) abort
if executable('dartfmt')
let buffer_content = join(getline(1, '$'), "\n")
let joined_lines = system(printf('dartfmt %s', a:q_args), buffer_content)
+ if buffer_content ==# joined_lines[:-2] | return | endif
if 0 == v:shell_error
let win_view = winsaveview()
let lines = split(joined_lines, "\n")
@@ -129,6 +130,15 @@ function! s:PackageMap() abort
return [v:true, map]
endfunction
+" Toggle whether dartfmt is run on save or not.
+function! dart#ToggleFormatOnSave() abort
+ if get(g:, "dart_format_on_save", 0)
+ let g:dart_format_on_save = 0
+ return
+ endif
+ let g:dart_format_on_save = 1
+endfunction
+
" Finds a file name '.packages' in the cwd, or in any directory above the open
" file.
"
diff --git a/autoload/xml/aria.vim b/autoload/xml/aria.vim
index 2a3c88f0..5e642e1d 100644
--- a/autoload/xml/aria.vim
+++ b/autoload/xml/aria.vim
@@ -94,44 +94,61 @@ let landmark_role = [
\ ]
" Ref: https://www.w3.org/TR/dpub-aria-1.0/
-" Version: W3C Candidate Recommendation 15 December 2016
+" Version: W3C Recommendation 14 December 2017
let dpub_role = [
- \ 'dpub-abstract',
- \ 'dpub-afterword',
- \ 'dpub-appendix',
- \ 'dpub-biblioentry',
- \ 'dpub-bibliography',
- \ 'dpub-biblioref',
- \ 'dpub-chapter',
- \ 'dpub-cover',
- \ 'dpub-epilogue',
- \ 'dpub-footnote',
- \ 'dpub-footnotes',
- \ 'dpub-foreword',
- \ 'dpub-glossary',
- \ 'dpub-glossdef',
- \ 'dpub-glossref',
- \ 'dpub-glossterm',
- \ 'dpub-index',
- \ 'dpub-locator',
- \ 'dpub-noteref',
- \ 'dpub-notice',
- \ 'dpub-pagebreak',
- \ 'dpub-pagelist',
- \ 'dpub-part',
- \ 'dpub-preface',
- \ 'dpub-prologue',
- \ 'dpub-pullquote',
- \ 'dpub-qna',
- \ 'dpub-subtitle',
- \ 'dpub-tip',
- \ 'dpub-title',
- \ 'dpub-toc'
+ \ 'doc-abstract',
+ \ 'doc-acknowledgments',
+ \ 'doc-afterword',
+ \ 'doc-appendix',
+ \ 'doc-backlink',
+ \ 'doc-biblioentry',
+ \ 'doc-bibliography',
+ \ 'doc-biblioref',
+ \ 'doc-chapter',
+ \ 'doc-colophon',
+ \ 'doc-conclusion',
+ \ 'doc-cover',
+ \ 'doc-credit',
+ \ 'doc-credits',
+ \ 'doc-dedication',
+ \ 'doc-endnote',
+ \ 'doc-endnotes',
+ \ 'doc-epigraph',
+ \ 'doc-epilogue',
+ \ 'doc-errata',
+ \ 'doc-example',
+ \ 'doc-footnote',
+ \ 'doc-foreword',
+ \ 'doc-glossary',
+ \ 'doc-glossref',
+ \ 'doc-index',
+ \ 'doc-introduction',
+ \ 'doc-noteref',
+ \ 'doc-notice',
+ \ 'doc-pagebreak',
+ \ 'doc-pagelist',
+ \ 'doc-part',
+ \ 'doc-preface',
+ \ 'doc-prologue',
+ \ 'doc-pullquote',
+ \ 'doc-qna',
+ \ 'doc-subtitle',
+ \ 'doc-tip',
+ \ 'doc-toc'
+\ ]
+
+" Ref: https://www.w3.org/TR/graphics-aria-1.0/
+" Version: W3C Candidate Recommendation 29 March 2018
+let graphic_role = [
+ \ 'graphics-document',
+ \ 'graphics-object',
+ \ 'graphics-symbol'
\ ]
let role = extend(widget_role, document_structure)
let role = extend(role, landmark_role)
let role = extend(role, dpub_role)
+let role = extend(role, graphic_role)
" https://www.w3.org/TR/wai-aria-1.1/#states_and_properties
let global_states_and_properties = {
diff --git a/autoload/xml/html5.vim b/autoload/xml/html5.vim
index 404dd567..5a474ace 100644
--- a/autoload/xml/html5.vim
+++ b/autoload/xml/html5.vim
@@ -374,6 +374,8 @@ let abutton_dec = 'details\\|embed\\|iframe\\|keygen\\|label\\|menu\\|select\\|t
let crossorigin = ['anonymous', 'use-credentials']
+let referrerpolicy = ['no-referrer', 'no-referrer-when-downgrade', 'same-origin', 'origin', 'strict-origin', 'origin-when-cross-origin', 'strict-origin-when-cross-origin', 'unsafe-url']
+
let g:xmldata_html5 = {
\ 'vimxmlentities': ['AElig', 'Aacute', 'Acirc', 'Agrave', 'Alpha', 'Aring', 'Atilde', 'Auml', 'Beta', 'Ccedil', 'Chi', 'Dagger', 'Delta', 'ETH', 'Eacute', 'Ecirc', 'Egrave', 'Epsilon', 'Eta', 'Euml', 'Gamma', 'Iacute', 'Icirc', 'Igrave', 'Iota', 'Iuml', 'Kappa', 'Lambda', 'Mu', 'Ntilde', 'Nu', 'OElig', 'Oacute', 'Ocirc', 'Ograve', 'Omega', 'Omicron', 'Oslash', 'Otilde', 'Ouml', 'Phi', 'Pi', 'Prime', 'Psi', 'Rho', 'Scaron', 'Sigma', 'THORN', 'Tau', 'Theta', 'Uacute', 'Ucirc', 'Ugrave', 'Upsilon', 'Uuml', 'Xi', 'Yacute', 'Yuml', 'Zeta', 'aacute', 'acirc', 'acute', 'aelig', 'agrave', 'alefsym', 'alpha', 'amp', 'and', 'ang', 'apos', 'aring', 'asymp', 'atilde', 'auml', 'bdquo', 'beta', 'brvbar', 'bull', 'cap', 'ccedil', 'cedil', 'cent', 'chi', 'circ', 'clubs', 'cong', 'copy', 'crarr', 'cup', 'curren', 'dArr', 'dagger', 'darr', 'deg', 'delta', 'diams', 'divide', 'eacute', 'ecirc', 'egrave', 'empty', 'emsp', 'ensp', 'epsilon', 'equiv', 'eta', 'eth', 'euml', 'euro', 'exist', 'fnof', 'forall', 'frac12', 'frac14', 'frac34', 'frasl', 'gamma', 'ge', 'gt', 'hArr', 'harr', 'hearts', 'hellip', 'iacute', 'icirc', 'iexcl', 'igrave', 'image', 'infin', 'int', 'iota', 'iquest', 'isin', 'iuml', 'kappa', 'lArr', 'lambda', 'lang', 'laquo', 'larr', 'lceil', 'ldquo', 'le', 'lfloor', 'lowast', 'loz', 'lrm', 'lsaquo', 'lsquo', 'lt', 'macr', 'mdash', 'micro', 'middot', 'minus', 'mu', 'nabla', 'nbsp', 'ndash', 'ne', 'ni', 'not', 'notin', 'nsub', 'ntilde', 'nu', 'oacute', 'ocirc', 'oelig', 'ograve', 'oline', 'omega', 'omicron', 'oplus', 'or', 'ordf', 'ordm', 'oslash', 'otilde', 'otimes', 'ouml', 'para', 'part', 'permil', 'perp', 'phi', 'pi', 'piv', 'plusmn', 'pound', 'prime', 'prod', 'prop', 'psi', 'quot', 'rArr', 'radic', 'rang', 'raquo', 'rarr', 'rceil', 'rdquo', 'real', 'reg', 'rfloor', 'rho', 'rlm', 'rsaquo', 'rsquo', 'sbquo', 'scaron', 'sdot', 'sect', 'shy', 'sigma', 'sigmaf', 'sim', 'spades', 'sub', 'sube', 'sum', 'sup', 'sup1', 'sup2', 'sup3', 'supe', 'szlig', 'tau', 'there4', 'theta', 'thetasym', 'thinsp', 'thorn', 'tilde', 'times', 'trade', 'uArr', 'uacute', 'uarr', 'ucirc', 'ugrave', 'uml', 'upsih', 'upsilon', 'uuml', 'weierp', 'xi', 'yacute', 'yen', 'yuml', 'zeta', 'zwj', 'zwnj'],
@@ -392,7 +394,7 @@ let g:xmldata_html5 = {
\ ],
\ 'area': [
\ [],
- \ extend(copy(global_attributes), {'alt': [], 'href': [], 'target': [], 'rel': linktypes, 'media': [], 'hreflang': lang_tag, 'type': [], 'shape': ['rect', 'circle', 'poly', 'default'], 'coords': [], 'referrerpolicy': ['no-referrer', 'no-referrer-when-downgrade', 'origin', 'origin-when-cross-origin', 'unsafe-url']})
+ \ extend(copy(global_attributes), {'alt': [], 'href': [], 'target': [], 'rel': linktypes, 'media': [], 'hreflang': lang_tag, 'type': [], 'shape': ['rect', 'circle', 'poly', 'default'], 'coords': [], 'referrerpolicy': referrerpolicy})
\ ],
\ 'article': [
\ flow_elements + ['style'],
@@ -490,6 +492,10 @@ let g:xmldata_html5 = {
\ filter(copy(phrasing_elements), "!(v:val =~ 'dfn')"),
\ global_attributes
\ ],
+\ 'dialog': [
+ \ flow_elements,
+ \ extend(copy(global_attributes), {'open': []})
+\ ],
\ 'div': [
\ flow_elements + ['style'],
\ global_attributes
@@ -580,11 +586,11 @@ let g:xmldata_html5 = {
\ ],
\ 'iframe': [
\ [],
- \ extend(copy(global_attributes), {'src': [], 'srcdoc': [], 'name': [], 'width': [], 'height': [], 'sandbox': ['allow-same-origin', 'allow-forms', 'allow-scripts'], 'seamless': ['seamless', ''], 'referrerpolicy': ['no-referrer', 'no-referrer-when-downgrade', 'origin', 'origin-when-cross-origin', 'unsafe-url'], 'allowfullscreen': [], 'allowpaymentrequest': [], 'allowpresentation': [], 'allowusermedia': []})
+ \ extend(copy(global_attributes), {'src': [], 'srcdoc': [], 'name': [], 'width': [], 'height': [], 'sandbox': ['allow-same-origin', 'allow-forms', 'allow-scripts'], 'seamless': ['seamless', ''], 'referrerpolicy': referrerpolicy, 'allowfullscreen': [], 'allowpaymentrequest': [], 'allowpresentation': [], 'allowusermedia': []})
\ ],
\ 'img': [
\ [],
- \ extend(copy(global_attributes), {'src': [], 'alt': [], 'height': [], 'width': [], 'decoding': ['async', 'sync', 'auto'], 'usemap': [], 'ismap': ['ismap', ''], 'referrerpolicy': ['no-referrer', 'no-referrer-when-downgrade', 'origin', 'origin-when-cross-origin', 'unsafe-url'], 'crossorigin': ['anonymous', 'use-credentials']})
+ \ extend(copy(global_attributes), {'src': [], 'alt': [], 'height': [], 'width': [], 'decoding': ['async', 'sync', 'auto'], 'usemap': [], 'ismap': ['ismap', ''], 'referrerpolicy': referrerpolicy, 'crossorigin': ['anonymous', 'use-credentials']})
\ ],
\ 'input': [
\ [],
@@ -616,7 +622,7 @@ let g:xmldata_html5 = {
\ ],
\ 'link': [
\ [],
- \ extend(copy(global_attributes), {'href': [], 'rel': linkreltypes, 'hreflang': lang_tag, 'media': [], 'type': [], 'sizes': ['any'], 'referrerpolicy': ['no-referrer', 'no-referrer-when-downgrade', 'origin', 'origin-when-cross-origin', 'unsafe-url'], 'crossorigin': crossorigin, 'preload': ['preload', ''], 'prefetch': ['prefetch', ''], 'as': ['report', 'document', 'document', 'object', 'embed', 'audio', 'font', 'image', 'audioworklet', 'paintworklet', 'script', 'serviceworker', 'sharedworker', 'worker', 'style', 'track', 'video', 'image', 'manifest', 'xslt', 'fetch', '']})
+ \ extend(copy(global_attributes), {'href': [], 'rel': linkreltypes, 'hreflang': lang_tag, 'media': [], 'type': [], 'sizes': ['any'], 'referrerpolicy': referrerpolicy, 'crossorigin': crossorigin, 'preload': ['preload', ''], 'prefetch': ['prefetch', ''], 'as': ['report', 'document', 'document', 'object', 'embed', 'audio', 'font', 'image', 'audioworklet', 'paintworklet', 'script', 'serviceworker', 'sharedworker', 'worker', 'style', 'track', 'video', 'image', 'manifest', 'xslt', 'fetch', '']})
\ ],
\ 'main': [
\ flow_elements + ['style'],