summaryrefslogtreecommitdiffstats
path: root/autoload
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2017-03-23 11:28:19 +0100
committerAdam Stankiewicz <sheerun@sher.pl>2017-03-23 11:28:28 +0100
commit0801eac01aab5940fc1e4409ba749383cc353bc2 (patch)
tree9034c9f6cd0c7592a09e6c65521c6948c3a983af /autoload
parent9f735b1fe77072e001a593f7f6660703bf4a8c9c (diff)
downloadvim-polyglot-0801eac01aab5940fc1e4409ba749383cc353bc2.tar.gz
vim-polyglot-0801eac01aab5940fc1e4409ba749383cc353bc2.zip
Update
Diffstat (limited to 'autoload')
-rw-r--r--autoload/dart.vim81
-rw-r--r--autoload/rubycomplete.vim12
-rw-r--r--autoload/xml/aria.vim240
-rw-r--r--autoload/xml/html5.vim45
4 files changed, 347 insertions, 31 deletions
diff --git a/autoload/dart.vim b/autoload/dart.vim
index df341b48..9f04fcc2 100644
--- a/autoload/dart.vim
+++ b/autoload/dart.vim
@@ -68,5 +68,86 @@ function! dart#tojs(q_args) abort
endif
endfunction
+" Finds the path to `uri`.
+"
+" If the file is a package: uri, looks for a .packages file to resolve the path.
+" If the path cannot be resolved, or is not a package: uri, returns the
+" original.
+function! dart#resolveUri(uri) abort
+ if a:uri !~ 'package:'
+ return a:uri
+ endif
+ let package_name = substitute(a:uri, 'package:\(\w\+\)\/.*', '\1', '')
+ let [found, package_map] = s:PackageMap()
+ if !found
+ call s:error('cannot find .packages file')
+ return a:uri
+ endif
+ if !has_key(package_map, package_name)
+ call s:error('no package mapping for '.package_name)
+ return a:uri
+ endif
+ let package_lib = package_map[package_name]
+ return substitute(a:uri,
+ \ 'package:'.package_name,
+ \ escape(package_map[package_name], '\'),
+ \ '')
+endfunction
+
+" A map from package name to lib directory parse from a '.packages' file.
+"
+" Returns [found, package_map]
+function! s:PackageMap() abort
+ let [found, dot_packages] = s:DotPackagesFile()
+ if !found
+ return [v:false, {}]
+ endif
+ let dot_packages_dir = fnamemodify(dot_packages, ':p:h')
+ let lines = readfile(dot_packages)
+ let map = {}
+ for line in lines
+ if line =~ '\s*#'
+ continue
+ endif
+ let package = substitute(line, ':.*$', '', '')
+ let lib_dir = substitute(line, '^[^:]*:', '', '')
+ if lib_dir =~ 'file:/'
+ let lib_dir = substitute(lib_dir, 'file://', '', '')
+ if lib_dir =~ '/[A-Z]:/'
+ let lib_dir = lib_dir[1:]
+ endif
+ else
+ let lib_dir = resolve(dot_packages_dir.'/'.lib_dir)
+ endif
+ if lib_dir =~ '/$'
+ let lib_dir = lib_dir[:len(lib_dir) - 2]
+ endif
+ let map[package] = lib_dir
+ endfor
+ return [v:true, map]
+endfunction
+
+" Finds a file name '.packages' in the cwd, or in any directory above the open
+" file.
+"
+" Returns [found, file].
+function! s:DotPackagesFile() abort
+ if filereadable('.packages')
+ return [v:true, '.packages']
+ endif
+ let dir_path = expand('%:p:h')
+ while v:true
+ let file_path = dir_path.'/.packages'
+ if filereadable(file_path)
+ return [v:true, file_path]
+ endif
+ let parent = fnamemodify(dir_path, ':h')
+ if dir_path == parent
+ break
+ endif
+ let dir_path = parent
+ endwhile
+ return [v:false, '']
+endfunction
endif
diff --git a/autoload/rubycomplete.vim b/autoload/rubycomplete.vim
index 973be8ef..8cb73fd5 100644
--- a/autoload/rubycomplete.vim
+++ b/autoload/rubycomplete.vim
@@ -589,11 +589,13 @@ class VimRubyCompletion
# {{{ main completion code
def self.preload_rails
a = VimRubyCompletion.new
- require 'Thread'
- Thread.new(a) do |b|
- begin
- b.load_rails
- rescue
+ if VIM::evaluate("has('nvim')") == 0
+ require 'thread'
+ Thread.new(a) do |b|
+ begin
+ b.load_rails
+ rescue
+ end
end
end
a.load_rails
diff --git a/autoload/xml/aria.vim b/autoload/xml/aria.vim
index 8974526e..2a3c88f0 100644
--- a/autoload/xml/aria.vim
+++ b/autoload/xml/aria.vim
@@ -3,33 +3,220 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html5') == -1
" Vim completion for WAI-ARIA data file
" Language: HTML + WAI-ARIA
" Maintainer: othree <othree@gmail.com>
-" Last Change: 2010 Sep 09
+" Last Change: 2017 Mar 07
" WAI_ARIA: {{{
-" Ref: http://www.w3.org/TR/wai-aria/
-" Version: Draft 15 December 2009
+" Ref: https://www.w3.org/TR/wai-aria-1.1/
+" Version: W3C Candidate Recommendation 27 October 2016
let abstract_role = {}
let role_attributes = {}
let default_role = {}
-" Ref: http://www.w3.org/TR/wai-aria/roles
-" Version: Draft 15 December 2009
-let widget_role = ['alert', 'alertdialog', 'button', 'checkbox', 'combobox', 'dialog', 'gridcell', 'link', 'log', 'marquee', 'menuitem', 'menuitemcheckbox', 'menuitemradio', 'option', 'progressbar', 'radio', 'radiogroup', 'scrollbar', 'slider', 'spinbutton', 'status', 'tab', 'tabpanel', 'textbox', 'timer', 'tooltip', 'treeitem', 'combobox', 'grid', 'listbox', 'menu', 'menubar', 'radiogroup', 'tablist', 'tree', 'treegrid']
-let document_structure = ['article', 'columnheader', 'definition', 'directory', 'document', 'group', 'heading', 'img', 'list', 'listitem', 'math', 'note', 'presentation', 'region', 'row', 'rowheader', 'separator']
-let landmark_role = ['application', 'banner', 'complementary', 'contentinfo', 'form', 'main', 'navigation', 'search']
-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']
+" Ref: https://www.w3.org/TR/wai-aria-1.1/#roles_categorization
+" Version: W3C Candidate Recommendation 27 October 2016
+let widget_role = [
+ \ 'alert',
+ \ 'alertdialog',
+ \ 'button',
+ \ 'checkbox',
+ \ 'combobox',
+ \ 'dialog',
+ \ 'gridcell',
+ \ 'link',
+ \ 'log',
+ \ 'marquee',
+ \ 'menuitem',
+ \ 'menuitemcheckbox',
+ \ 'menuitemradio',
+ \ 'option',
+ \ 'progressbar',
+ \ 'radio',
+ \ 'radiogroup',
+ \ 'scrollbar',
+ \ 'searchbox',
+ \ 'slider',
+ \ 'spinbutton',
+ \ 'status',
+ \ 'switch',
+ \ 'tab',
+ \ 'tabpanel',
+ \ 'textbox',
+ \ 'timer',
+ \ 'tooltip',
+ \ 'treeitem',
+ \ 'combobox',
+ \ 'grid',
+ \ 'listbox',
+ \ 'menu',
+ \ 'menubar',
+ \ 'radiogroup',
+ \ 'tablist',
+ \ 'tree',
+ \ 'treegrid'
+\ ]
+
+let document_structure = [
+ \ 'article',
+ \ 'cell',
+ \ 'columnheader',
+ \ 'definition',
+ \ 'directory',
+ \ 'document',
+ \ 'feed',
+ \ 'figure',
+ \ 'group',
+ \ 'heading',
+ \ 'img',
+ \ 'list',
+ \ 'listitem',
+ \ 'math',
+ \ 'none',
+ \ 'note',
+ \ 'presentation',
+ \ 'region',
+ \ 'row',
+ \ 'rowheader',
+ \ 'separator',
+ \ 'table',
+ \ 'term'
+\ ]
+
+let landmark_role = [
+ \ 'application',
+ \ 'banner',
+ \ 'complementary',
+ \ 'contentinfo',
+ \ 'form',
+ \ 'main',
+ \ 'navigation',
+ \ 'search'
+\ ]
+
+" Ref: https://www.w3.org/TR/dpub-aria-1.0/
+" Version: W3C Candidate Recommendation 15 December 2016
+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'
+\ ]
+
let role = extend(widget_role, document_structure)
let role = extend(role, landmark_role)
let role = extend(role, dpub_role)
-" http://www.w3.org/TR/wai-aria/states_and_properties#state_prop_taxonomy
-"let global_states_and_properties = {'aria-atomic': ['true', 'false'], 'aria-busy': ['true', 'false'], 'aria-controls': [], 'aria-describedby': [], 'aria-disabled': ['true', 'false'], 'aria-dropeffect': ['copy', 'move', 'link', 'execute', 'popup', 'none'], 'aria-flowto': [], 'aria-grabbed': ['true', 'false', 'undefined'], 'aria-haspopup': ['true', 'false'], 'aria-hidden': ['true', 'false'], 'aria-invalid': ['grammar', 'spelling', 'true', 'false'], 'aria-label': [], 'aria-labelledby': [], 'aria-live': ['off', 'polite', 'assertive'], 'aria-owns': [], 'aria-relevant': ['additions', 'removals', 'text', 'all']}
-let widget_attributes = {'aria-autocomplete': ['inline', 'list', 'both', 'none'], 'aria-checked': ['true', 'false', 'mixed', 'undefined'], 'aria-disabled': ['true', 'false'], 'aria-expanded': ['true', 'false', 'undefined'], 'aria-haspopup': ['true', 'false'], 'aria-hidden': ['true', 'false'], 'aria-invalid': ['grammar', 'spelling', 'true', 'false'], 'aria-label': [], 'aria-level': [], 'aria-multiline': ['true', 'false'], 'aria-multiselectable': ['true', 'false'], 'aria-orientation': ['horizontal', 'vertical'], 'aria-pressed': ['true', 'false', 'mixed', 'undefined'], 'aria-readonly': ['true', 'false'], 'aria-required': ['true', 'false'], 'aria-selected': ['true', 'false', 'undefined'], 'aria-sort': ['ascending', 'descending', 'none', 'other'], 'aria-valuemax': [], 'aria-valuemin': [], 'aria-valuenow': [], 'aria-valuetext': []}
-let live_region_attributes = {'aria-atomic': ['true', 'false'], 'aria-busy': ['true', 'false'], 'aria-live': ['off', 'polite', 'assertive'], 'aria-relevant': ['additions', 'removals', 'text', 'all', 'additions text']}
-let drag_and_drop_attributes = {'aria-dropeffect': ['copy', 'move', 'link', 'execute', 'popup', 'none'], 'aria-grabbed': ['true', 'false', 'undefined']}
-let relationship_attributes = {'aria-activedescendant': [], 'aria-controls': [], 'aria-describedby': [], 'aria-flowto': [], 'aria-labelledby': [], 'aria-owns': [], 'aria-posinset': [], 'aria-setsize': []}
-let aria_attributes = widget_attributes
+" https://www.w3.org/TR/wai-aria-1.1/#states_and_properties
+let global_states_and_properties = {
+ \ 'aria-atomic': ['true', 'false'],
+ \ 'aria-busy': ['true', 'false'],
+ \ 'aria-controls': [],
+ \ 'aria-current': [],
+ \ 'aria-describedby': [],
+ \ 'aria-disabled': ['true', 'false'],
+ \ 'aria-dropeffect': ['copy', 'move', 'link', 'execute', 'popup', 'none'],
+ \ 'aria-errormessage': [],
+ \ 'aria-flowto': [],
+ \ 'aria-grabbed': ['true', 'false', 'undefined'],
+ \ 'aria-haspopup': ['true', 'false'],
+ \ 'aria-hidden': ['true', 'false'],
+ \ 'aria-invalid': ['grammar', 'spelling', 'true', 'false'],
+ \ 'aria-keyshortcuts': [],
+ \ 'aria-label': [],
+ \ 'aria-labelledby': [],
+ \ 'aria-live': ['off', 'polite', 'assertive'],
+ \ 'aria-owns': [],
+ \ 'aria-relevant': ['additions', 'removals', 'text', 'all'],
+ \ 'aria-roledescription': [],
+\ }
+
+let widget_attributes = {
+ \ 'aria-autocomplete': ['inline', 'list', 'both', 'none'],
+ \ 'aria-checked': ['true', 'false', 'mixed', 'undefined'],
+ \ 'aria-disabled': ['true', 'false'],
+ \ 'aria-errormessage': [],
+ \ 'aria-expanded': ['true', 'false', 'undefined'],
+ \ 'aria-haspopup': ['true', 'false'],
+ \ 'aria-hidden': ['true', 'false'],
+ \ 'aria-invalid': ['grammar', 'spelling', 'true', 'false'],
+ \ 'aria-label': [],
+ \ 'aria-level': [],
+ \ 'aria-modal': ['true', 'false'],
+ \ 'aria-multiline': ['true', 'false'],
+ \ 'aria-multiselectable': ['true', 'false'],
+ \ 'aria-orientation': ['horizontal', 'vertical'],
+ \ 'aria-placeholder': [],
+ \ 'aria-pressed': ['true', 'false', 'mixed', 'undefined'],
+ \ 'aria-readonly': ['true', 'false'],
+ \ 'aria-required': ['true', 'false'],
+ \ 'aria-selected': ['true', 'false', 'undefined'],
+ \ 'aria-sort': ['ascending', 'descending', 'none', 'other'],
+ \ 'aria-valuemax': [],
+ \ 'aria-valuemin': [],
+ \ 'aria-valuenow': [],
+ \ 'aria-valuetext': []
+\ }
+
+let live_region_attributes = {
+ \ 'aria-atomic': ['true', 'false'],
+ \ 'aria-busy': ['true', 'false'],
+ \ 'aria-live': ['off', 'polite', 'assertive'],
+ \ 'aria-relevant': ['additions', 'removals', 'text', 'all', 'additions text']
+\ }
+
+let drag_and_drop_attributes = {
+ \ 'aria-dropeffect': ['copy', 'move', 'link', 'execute', 'popup', 'none'],
+ \ 'aria-grabbed': ['true', 'false', 'undefined']
+\ }
+
+let relationship_attributes = {
+ \ 'aria-activedescendant': [],
+ \ 'aria-colcount': [],
+ \ 'aria-colindex': [],
+ \ 'aria-colspan': [],
+ \ 'aria-controls': [],
+ \ 'aria-describedby': [],
+ \ 'aria-details': [],
+ \ 'aria-errormessage': [],
+ \ 'aria-flowto': [],
+ \ 'aria-labelledby': [],
+ \ 'aria-owns': [],
+ \ 'aria-posinset': [],
+ \ 'aria-rowcount': [],
+ \ 'aria-rowindex': [],
+ \ 'aria-rowspan': [],
+ \ 'aria-setsize': []
+\ }
+
+let aria_attributes = global_states_and_properties
+let aria_attributes = extend(aria_attributes, widget_attributes)
let aria_attributes = extend(aria_attributes, live_region_attributes)
let aria_attributes = extend(aria_attributes, drag_and_drop_attributes)
let aria_attributes = extend(aria_attributes, relationship_attributes)
@@ -84,6 +271,8 @@ let role_attributes['status'] = abstract_role['composite'] + role_attributes['re
let role_attributes['tab'] = abstract_role['sectionhead'] + abstract_role['widget'] + ['aria-selected']
let role_attributes['tabpanel'] = role_attributes['region']
let role_attributes['textbox'] = abstract_role['input'] + ['aria-autocomplete', 'aria-multiline', 'aria-readonly', 'aria-required']
+let role_attributes['searchbox'] = role_attributes['textbox']
+let role_attributes['switch'] = role_attributes['checkbox']
let role_attributes['timer'] = role_attributes['status']
let role_attributes['tooltip'] = abstract_role['section']
let role_attributes['treeitem'] = role_attributes['listitem'] + role_attributes['option']
@@ -101,16 +290,22 @@ let role_attributes['treegrid'] = role_attributes['grid'] + role_attributes['tre
let role_attributes['document'] = abstract_role['structure'] + ['aria-expanded']
let role_attributes['article'] = role_attributes['document'] + role_attributes['region']
+let role_attributes['cell'] = abstract_role['section'] + ['aria-colindex', 'aria-colspan', 'aria-rowindex', 'aria-rowspan']
let role_attributes['columnheader'] = role_attributes['gridcell'] + abstract_role['sectionhead'] + ['aria-sort']
let role_attributes['definition'] = abstract_role['section']
+let role_attributes['feed'] = role_attributes['list']
+let role_attributes['figure'] = abstract_role['section']
let role_attributes['heading'] = abstract_role['sectionhead'] + ['aria-level']
let role_attributes['img'] = abstract_role['section']
let role_attributes['math'] = abstract_role['section']
let role_attributes['note'] = abstract_role['section']
let role_attributes['presentation'] = abstract_role['structure']
+let role_attributes['none'] = role_attributes['presentation']
let role_attributes['row'] = role_attributes['group'] + ['aria-level', 'aria-selected']
let role_attributes['rowheader'] = role_attributes['gridcell'] + abstract_role['sectionhead']
let role_attributes['separator'] = abstract_role['structure'] + ['aria-expanded']
+let role_attributes['table'] = abstract_role['section'] + ['aria-colcount', 'aria-rowcount']
+let role_attributes['term'] = abstract_role['section']
" Landmark Roles
let role_attributes['application'] = abstract_role['landmark']
@@ -126,19 +321,30 @@ let role_attributes['search'] = abstract_role['landmark']
let aria_attributes_value = {
\ 'aria-autocomplete': ['ID', ''],
\ 'aria-checked': ['Token', ''],
+ \ 'aria-colcount': ['Number', ''],
+ \ 'aria-colindex': ['Number', ''],
+ \ 'aria-colspan': ['Number', ''],
\ 'aria-disabled': ['true/false', ''],
+ \ 'aria-errormessage': ['ID', ''],
\ 'aria-expanded': ['Token', ''],
- \ 'aria-haspopup': ['true/false', ''],
+ \ 'aria-haspopup': ['Token', ''],
\ 'aria-hidden': ['true/false', ''],
\ 'aria-invalid': ['Token', ''],
+ \ 'aria-keyshortcuts': ['String', ''],
\ 'aria-label': ['String', ''],
\ 'aria-level': ['Int', ''],
+ \ 'aria-modal': ['true/false', ''],
\ 'aria-multiline': ['true/false', ''],
\ 'aria-multiselectable': ['true/false', ''],
\ 'aria-orientation': ['Token', ''],
+ \ 'aria-placeholder': ['String', ''],
\ 'aria-pressed': ['Token', ''],
\ 'aria-readonly': ['true/false', ''],
\ 'aria-required': ['true/false', ''],
+ \ 'aria-roledescription': ['String', ''],
+ \ 'aria-rowcount': ['Number', ''],
+ \ 'aria-rowindex': ['Number', ''],
+ \ 'aria-rowspan': ['Number', ''],
\ 'aria-selected': ['Token', ''],
\ 'aria-sort': ['Token', ''],
\ 'aria-valuemax': ['Number', ''],
diff --git a/autoload/xml/html5.vim b/autoload/xml/html5.vim
index 12c61363..73b24a4c 100644
--- a/autoload/xml/html5.vim
+++ b/autoload/xml/html5.vim
@@ -80,6 +80,9 @@ let attributes_value = {
\ 'accept-charset': ['Charset', ''],
\ 'accesskey': ['Character', ''],
\ 'action': ['URL', ''],
+ \ 'allowfullscreen': ['Bool', ''],
+ \ 'allowpaymentrequest': ['Bool', ''],
+ \ 'allowusermedia': ['Bool', ''],
\ 'alt': ['Text', ''],
\ 'async': ['Bool', ''],
\ 'autocomplete': ['*Token', ''],
@@ -142,6 +145,7 @@ let attributes_value = {
\ 'optimum': ['Number', ''],
\ 'pattern': ['Pattern', ''],
\ 'placeholder': ['Text', ''],
+ \ 'playsinline': ['Bool', ''],
\ 'poster': ['URL', ''],
\ 'preload': ['Token', ''],
\ 'pubdate': ['Bool', ''],
@@ -315,10 +319,10 @@ if !exists('g:html5_aria_attributes_complete')
let g:html5_aria_attributes_complete = 1
endif
if g:html5_aria_attributes_complete == 1
- " Ref: http://www.w3.org/TR/wai-aria/roles
- " Version: Draft 15 December 2009
- let widget_role = ['alert', 'alertdialog', 'button', 'checkbox', 'combobox', 'dialog', 'gridcell', 'link', 'log', 'marquee', 'menuitem', 'menuitemcheckbox', 'menuitemradio', 'option', 'progressbar', 'radio', 'radiogroup', 'scrollbar', 'slider', 'spinbutton', 'status', 'tab', 'tabpanel', 'textbox', 'timer', 'tooltip', 'treeitem', 'combobox', 'grid', 'listbox', 'menu', 'menubar', 'radiogroup', 'tablist', 'tree', 'treegrid']
- let document_structure = ['article', 'columnheader', 'definition', 'directory', 'document', 'group', 'heading', 'img', 'list', 'listitem', 'math', 'note', 'presentation', 'region', 'row', 'rowheader', 'separator']
+ " Ref: https://www.w3.org/TR/wai-aria-1.1/#role_definitions
+ " Version: W3C Candidate Recommendation 27 October 2016
+ let widget_role = ['alert', 'alertdialog', 'button', 'checkbox', 'combobox', 'dialog', 'gridcell', 'link', 'log', 'marquee', 'menuitem', 'menuitemcheckbox', 'menuitemradio', 'option', 'progressbar', 'radio', 'radiogroup', 'scrollbar', 'searchbox', 'slider', 'spinbutton', 'status', 'switch', 'tab', 'tabpanel', 'textbox', 'timer', 'tooltip', 'treeitem', 'combobox', 'grid', 'listbox', 'menu', 'menubar', 'radiogroup', 'tablist', 'tree', 'treegrid']
+ let document_structure = ['article', 'cell', 'columnheader', 'definition', 'directory', 'document', 'feed', 'figure', 'group', 'heading', 'img', 'list', 'listitem', 'math', 'none', 'note', 'presentation', 'region', 'row', 'rowheader', 'separator', 'table', 'term']
let landmark_role = ['application', 'banner', 'complementary', 'contentinfo', 'form', 'main', 'navigation', 'search']
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']
let role = extend(widget_role, document_structure)
@@ -336,10 +340,33 @@ let metadata_elements = ['link', 'style', 'meta', 'script', 'noscript', 'command
let flow_elements = phrasing_elements + ['p', 'hr', 'pre', 'ul', 'ol', 'dl', 'div', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hgroup', 'address', 'blockquote', 'ins', 'del', 'element', 'object', 'main', 'map', 'noscript', 'section', 'nav', 'article', 'aside', 'header', 'footer', 'video', 'audio', 'figure', 'table', 'template', 'form', 'fieldset', 'menu', 'canvas', 'details']
-" http://dev.w3.org/html5/spec/Overview.html#linkTypes
-let linktypes = ['alternate', 'author', 'bookmark', 'external', 'help', 'icon', 'license', 'next', 'nofollow', 'noreferrer', 'pingback', 'prefetch', 'prev', 'search', 'stylesheet', 'sidebar', 'tag']
+" https://html.spec.whatwg.org/#linkTypes
+let linktypes = ['alternate', 'author', 'bookmark', 'dns-prefetch', 'external', 'help', 'icon', 'license', 'next', 'nofollow', 'noreferrer', 'noopener', 'pingback', 'preconnect', 'prefetch', 'preload', 'prerender', 'prev', 'search', 'stylesheet', 'tag']
+" https://w3c.github.io/manifest/
+let linkreltypes = linktypes
+let linkreltypes = linkreltypes + ['manifest']
" http://googlewebmastercentral.blogspot.com/2009/02/specify-your-canonical.html
-let linkreltypes = linktypes + ['canonical', 'import']
+" http://www.ysearchblog.com/2009/02/12/fighting-duplication-adding-more-arrows-to-your-quiver/
+" http://blogs.bing.com/webmaster/2009/02/12/partnering-to-help-solve-duplicate-content-issues
+let linkreltypes = linkreltypes + ['canonical']
+" http://w3c.github.io/webcomponents/spec/imports/
+let linkreltypes = linkreltypes + ['import']
+" https://www.w3.org/TR/webmention/#sender-discovers-receiver-webmention-endpoint
+let linkreltypes = linkreltypes + ['webmention']
+" http://www.opensearch.org/Specifications/OpenSearch/1.1#Autodiscovery_in_HTML.2FXHTML
+let linkreltypes = linkreltypes + ['search']
+" http://microformats.org/wiki/rel-sitemap
+let linkreltypes = linkreltypes + ['sitemap']
+" https://www.ampproject.org/docs/get_started/create/prepare_for_discovery
+let linkreltypes = linkreltypes + ['amphtml']
+" https://developer.apple.com/library/content/documentation/AppleApplications/Reference/SafariWebContent/ConfiguringWebApplications/ConfiguringWebApplications.html
+let linkreltypes = linkreltypes + ['apple-touch-icon', 'apple-touch-icon-precomposed', 'apple-touch-startup-image']
+" https://developer.chrome.com/webstore/inline_installation
+let linkreltypes = linkreltypes + ['chrome-webstore-item']
+" http://pubsubhubbub.github.io/PubSubHubbub/pubsubhubbub-core-0.4.html#rfc.section.4
+let linkreltypes = linkreltypes + ['hub']
+" https://golem.ph.utexas.edu/~distler/blog/archives/000320.html
+let linkreltypes = linkreltypes + ['pgpkey']
" a and button are special elements for interactive, some element can't be its descendent
let abutton_dec = 'details\\|embed\\|iframe\\|keygen\\|label\\|menu\\|select\\|textarea'
@@ -551,7 +578,7 @@ 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']})
+ \ 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': [], 'allowusermedia': []})
\ ],
\ 'img': [
\ [],
@@ -807,7 +834,7 @@ let g:xmldata_html5 = {
\ ],
\ 'video': [
\ flow_elements + ['source', 'track'],
- \ extend(copy(global_attributes), {'autoplay': ['autoplay', ''], 'preload': ['none', 'metadata', 'auto', ''], 'controls': ['controls', ''], 'loop': ['loop', ''], 'poster': [], 'height': [], 'width': [], 'src': []})
+ \ extend(copy(global_attributes), {'autoplay': ['autoplay', ''], 'preload': ['none', 'metadata', 'auto', ''], 'controls': ['controls', ''], 'loop': ['loop', ''], 'playsinline': ['playsinline', ''], 'poster': [], 'height': [], 'width': [], 'src': []})
\ ],
\ 'wbr': [
\ [],