Skip to content

Commit

Permalink
feat: Adjust indentation for b:doge_pattern items
Browse files Browse the repository at this point in the history
  • Loading branch information
kkoomen committed May 30, 2019
1 parent 7b04196 commit 9522f3e
Show file tree
Hide file tree
Showing 10 changed files with 342 additions and 342 deletions.
40 changes: 20 additions & 20 deletions ftplugin/coffee.vim
Original file line number Diff line number Diff line change
Expand Up @@ -110,26 +110,26 @@ let b:doge_patterns = []
" The group for the default value is a capturing group which may contain 1
" or more of the following characters: '[^,]'.
call add(b:doge_patterns, {
\ 'match': '\m^\([[:alnum:]_$]\+\)\%(<[[:alnum:][:space:]_,]*>\)\?\s*[:=]\?\s*(\([^>]\{-}\))\%(\s*:\s*(\?\([[:alnum:][:space:]_[\].,|<>]\+\))\?\)\?\s*->',
\ 'match_group_names': ['funcName', 'parameters', 'returnType'],
\ 'parameters': {
\ 'match': '\m\([[:alnum:]_$]\+\)\%(\s*:\s*\([[:alnum:][:space:]._|]\+\%(\[[[:alnum:][:space:]_[\],]*\]\)\?\)\)\?\%(\s*=\s*\([^,]\+\)\+\)\?',
\ 'match_group_names': ['name', 'type', 'default'],
\ 'format': ['@param', '!{{type|*}}', '{name}', '- TODO'],
\ },
\ 'comment': {
\ 'insert': 'above',
\ 'trim_comparision_check': 0,
\ 'template': [
\ '###',
\ '@function {funcName|}',
\ '@description TODO',
\ '{parameters}',
\ '!@return {{returnType}} TODO',
\ '###',
\ ],
\ },
\ })
\ 'match': '\m^\([[:alnum:]_$]\+\)\%(<[[:alnum:][:space:]_,]*>\)\?\s*[:=]\?\s*(\([^>]\{-}\))\%(\s*:\s*(\?\([[:alnum:][:space:]_[\].,|<>]\+\))\?\)\?\s*->',
\ 'match_group_names': ['funcName', 'parameters', 'returnType'],
\ 'parameters': {
\ 'match': '\m\([[:alnum:]_$]\+\)\%(\s*:\s*\([[:alnum:][:space:]._|]\+\%(\[[[:alnum:][:space:]_[\],]*\]\)\?\)\)\?\%(\s*=\s*\([^,]\+\)\+\)\?',
\ 'match_group_names': ['name', 'type', 'default'],
\ 'format': ['@param', '!{{type|*}}', '{name}', '- TODO'],
\ },
\ 'comment': {
\ 'insert': 'above',
\ 'trim_comparision_check': 0,
\ 'template': [
\ '###',
\ '@function {funcName|}',
\ '@description TODO',
\ '{parameters}',
\ '!@return {{returnType}} TODO',
\ '###',
\ ],
\ },
\})

let &cpoptions = s:save_cpo
unlet s:save_cpo
38 changes: 19 additions & 19 deletions ftplugin/java.vim
Original file line number Diff line number Diff line change
Expand Up @@ -96,25 +96,25 @@ let b:doge_patterns = []
" Matches a captured group, denoted as '\( ... \)', which may contain 1 or
" more of the following characters '[[:alnum:]_]'.
call add(b:doge_patterns, {
\ 'match': '\m^\%(public\|private\|protected\)\?\s*\%(static\)\?\s*\%(final\)\?\s*\%(\([[:alnum:]_]\+\)\%(<[[:alnum:][:space:]_,]*>\)\?\)\s*\([[:alnum:]_]\+\)\s*(\(.\{-}\))\s*{',
\ 'match_group_names': ['returnType', 'funcName', 'parameters'],
\ 'parameters': {
\ 'match': '\m\%(\([[:alnum:]_]\+\)\%(<[[:alnum:][:space:]_,]\+>\)\?\)\%(\s\+[.]\{3}\s\+\|\s\+[.]\{3}\|[.]\{3}\s\+\|\s\+\)\([[:alnum:]_]\+\)',
\ 'match_group_names': ['type', 'name'],
\ 'format': ['@param', '{type}', '{name}', 'TODO'],
\ },
\ 'comment': {
\ 'insert': 'above',
\ 'trim_comparision_check': 0,
\ 'template': [
\ '/**',
\ ' * TODO',
\ ' * {parameters}',
\ '! * @return {returnType} TODO',
\ ' */',
\ ],
\ },
\ })
\ 'match': '\m^\%(public\|private\|protected\)\?\s*\%(static\)\?\s*\%(final\)\?\s*\%(\([[:alnum:]_]\+\)\%(<[[:alnum:][:space:]_,]*>\)\?\)\s*\([[:alnum:]_]\+\)\s*(\(.\{-}\))\s*{',
\ 'match_group_names': ['returnType', 'funcName', 'parameters'],
\ 'parameters': {
\ 'match': '\m\%(\([[:alnum:]_]\+\)\%(<[[:alnum:][:space:]_,]\+>\)\?\)\%(\s\+[.]\{3}\s\+\|\s\+[.]\{3}\|[.]\{3}\s\+\|\s\+\)\([[:alnum:]_]\+\)',
\ 'match_group_names': ['type', 'name'],
\ 'format': ['@param', '{type}', '{name}', 'TODO'],
\ },
\ 'comment': {
\ 'insert': 'above',
\ 'trim_comparision_check': 0,
\ 'template': [
\ '/**',
\ ' * TODO',
\ ' * {parameters}',
\ '! * @return {returnType} TODO',
\ ' */',
\ ],
\ },
\})

let &cpoptions = s:save_cpo
unlet s:save_cpo
108 changes: 54 additions & 54 deletions ftplugin/javascript.vim
Original file line number Diff line number Diff line change
Expand Up @@ -56,20 +56,20 @@ let b:doge_patterns = []
" --------------------------------------------------------------------------
" Matches 0 or more spaces, followed by the character '{'.
call add(b:doge_patterns, {
\ 'match': '\m^\%(export\s*\)\?class\s\+\([[:alnum:]_$]\+\)\%(\s\+extends\s\+\([[:alnum:]_$]\+\)\)\?\%(\s\+implements\s\+\([[:alnum:]_$]\+\)\)\?\s*{',
\ 'match_group_names': ['className', 'parentClassName', 'interfaceName'],
\ 'comment': {
\ 'insert': 'above',
\ 'trim_comparision_check': 0,
\ 'template': [
\ '/**',
\ ' * TODO',
\ '! * @extends {parentClassName}',
\ '! * @implements {interfaceName}',
\ ' */',
\ ],
\ },
\ })
\ 'match': '\m^\%(export\s*\)\?class\s\+\([[:alnum:]_$]\+\)\%(\s\+extends\s\+\([[:alnum:]_$]\+\)\)\?\%(\s\+implements\s\+\([[:alnum:]_$]\+\)\)\?\s*{',
\ 'match_group_names': ['className', 'parentClassName', 'interfaceName'],
\ 'comment': {
\ 'insert': 'above',
\ 'trim_comparision_check': 0,
\ 'template': [
\ '/**',
\ ' * TODO',
\ '! * @extends {parentClassName}',
\ '! * @implements {interfaceName}',
\ ' */',
\ ],
\ },
\})

""
" ==============================================================================
Expand Down Expand Up @@ -175,26 +175,26 @@ call add(b:doge_patterns, {
" The group for the default value is a capturing group which may contain 1
" or more of the following characters: '[^,]'.
call add(b:doge_patterns, {
\ 'match': '\m^\%(\%(\%(var\|const\|let\)\s\+\)\?\([[:alnum:]_$]\+\)\s*=\s*\)\?({\?\([^>]\{-}\)}\?)\%(\s*:\s*(\?\([[:alnum:][:space:]_[\].,|<>]\+\))\?\)\?\s*=>\s*[{(]',
\ 'match_group_names': ['funcName', 'parameters', 'returnType'],
\ 'parameters': {
\ 'match': '\m\%(\%(public\|private\|protected\)\?\s*\)\?\([[:alnum:]_$]\+\)\%(\s*:\s*\([[:alnum:][:space:]._|]\+\%(\[[[:alnum:][:space:]_[\],]*\]\)\?\)\)\?\%(\s*=\s*\([^,]\+\)\+\)\?',
\ 'match_group_names': ['name', 'type', 'default'],
\ 'format': ['@param', '!{{type|*}}', '{name}', '- TODO'],
\ },
\ 'comment': {
\ 'insert': 'above',
\ 'trim_comparision_check': 0,
\ 'template': [
\ '/**',
\ ' * @function {funcName|}',
\ ' * @description TODO',
\ ' * {parameters}',
\ '! * @return {{returnType}} TODO',
\ ' */',
\ ],
\ },
\ })
\ 'match': '\m^\%(\%(\%(var\|const\|let\)\s\+\)\?\([[:alnum:]_$]\+\)\s*=\s*\)\?({\?\([^>]\{-}\)}\?)\%(\s*:\s*(\?\([[:alnum:][:space:]_[\].,|<>]\+\))\?\)\?\s*=>\s*[{(]',
\ 'match_group_names': ['funcName', 'parameters', 'returnType'],
\ 'parameters': {
\ 'match': '\m\%(\%(public\|private\|protected\)\?\s*\)\?\([[:alnum:]_$]\+\)\%(\s*:\s*\([[:alnum:][:space:]._|]\+\%(\[[[:alnum:][:space:]_[\],]*\]\)\?\)\)\?\%(\s*=\s*\([^,]\+\)\+\)\?',
\ 'match_group_names': ['name', 'type', 'default'],
\ 'format': ['@param', '!{{type|*}}', '{name}', '- TODO'],
\ },
\ 'comment': {
\ 'insert': 'above',
\ 'trim_comparision_check': 0,
\ 'template': [
\ '/**',
\ ' * @function {funcName|}',
\ ' * @description TODO',
\ ' * {parameters}',
\ '! * @return {{returnType}} TODO',
\ ' */',
\ ],
\ },
\})

""
" ==============================================================================
Expand Down Expand Up @@ -312,26 +312,26 @@ call add(b:doge_patterns, {
" The group for the default value is a capturing group which may contain 1
" or more of the following characters: '[^,]'.
call add(b:doge_patterns, {
\ 'match': '\m^\%(export\s\+\)\?\%(function\s*\)\?\([[:alnum:]_$]\+\)\?\%(<[[:alnum:][:space:]_,]*>\)\?(\([^>]\{-}\))\%(\s*:\s*(\?\([[:alnum:][:space:]_[\].,|<>]\+\))\?\)\?\s*[{(]',
\ 'match_group_names': ['funcName', 'parameters', 'returnType'],
\ 'parameters': {
\ 'match': '\m\%(\%(public\|private\|protected\)\?\s*\)\([[:alnum:]_$]\+\)\%(\s*:\s*\([[:alnum:][:space:]._|]\+\%(\[[[:alnum:][:space:]_[\],]*\]\)\?\)\)\?\%(\s*=\s*\([^,]\+\)\+\)\?',
\ 'match_group_names': ['name', 'type', 'default'],
\ 'format': ['@param', '!{{type|*}}', '{name}', '- TODO'],
\ },
\ 'comment': {
\ 'insert': 'above',
\ 'trim_comparision_check': 0,
\ 'template': [
\ '/**',
\ ' * @function {funcName|}',
\ ' * @description TODO',
\ ' * {parameters}',
\ '! * @return {{returnType}} TODO',
\ ' */',
\ ],
\ },
\ })
\ 'match': '\m^\%(export\s\+\)\?\%(function\s*\)\?\([[:alnum:]_$]\+\)\?\%(<[[:alnum:][:space:]_,]*>\)\?(\([^>]\{-}\))\%(\s*:\s*(\?\([[:alnum:][:space:]_[\].,|<>]\+\))\?\)\?\s*[{(]',
\ 'match_group_names': ['funcName', 'parameters', 'returnType'],
\ 'parameters': {
\ 'match': '\m\%(\%(public\|private\|protected\)\?\s*\)\([[:alnum:]_$]\+\)\%(\s*:\s*\([[:alnum:][:space:]._|]\+\%(\[[[:alnum:][:space:]_[\],]*\]\)\?\)\)\?\%(\s*=\s*\([^,]\+\)\+\)\?',
\ 'match_group_names': ['name', 'type', 'default'],
\ 'format': ['@param', '!{{type|*}}', '{name}', '- TODO'],
\ },
\ 'comment': {
\ 'insert': 'above',
\ 'trim_comparision_check': 0,
\ 'template': [
\ '/**',
\ ' * @function {funcName|}',
\ ' * @description TODO',
\ ' * {parameters}',
\ '! * @return {{returnType}} TODO',
\ ' */',
\ ],
\ },
\})

let &cpoptions = s:save_cpo
unlet s:save_cpo
108 changes: 54 additions & 54 deletions ftplugin/jsx.vim
Original file line number Diff line number Diff line change
Expand Up @@ -58,20 +58,20 @@ let b:doge_patterns = []
" --------------------------------------------------------------------------
" Matches 0 or more spaces, followed by the character '{'.
call add(b:doge_patterns, {
\ 'match': '\m^\%(export\s*\)\?class\s\+\([[:alnum:]_$]\+\)\%(\s\+extends\s\+\([[:alnum:]_$]\+\)\)\?\%(\s\+implements\s\+\([[:alnum:]_$]\+\)\)\?\s*{',
\ 'match_group_names': ['className', 'parentClassName', 'interfaceName'],
\ 'comment': {
\ 'insert': 'above',
\ 'trim_comparision_check': 0,
\ 'template': [
\ '/**',
\ ' * TODO',
\ '! * @extends {parentClassName}',
\ '! * @implements {interfaceName}',
\ ' */',
\ ],
\ },
\ })
\ 'match': '\m^\%(export\s*\)\?class\s\+\([[:alnum:]_$]\+\)\%(\s\+extends\s\+\([[:alnum:]_$]\+\)\)\?\%(\s\+implements\s\+\([[:alnum:]_$]\+\)\)\?\s*{',
\ 'match_group_names': ['className', 'parentClassName', 'interfaceName'],
\ 'comment': {
\ 'insert': 'above',
\ 'trim_comparision_check': 0,
\ 'template': [
\ '/**',
\ ' * TODO',
\ '! * @extends {parentClassName}',
\ '! * @implements {interfaceName}',
\ ' */',
\ ],
\ },
\})

""
" ==============================================================================
Expand Down Expand Up @@ -177,26 +177,26 @@ call add(b:doge_patterns, {
" The group for the default value is a capturing group which may contain 1
" or more of the following characters: '[^,]'.
call add(b:doge_patterns, {
\ 'match': '\m^\%(\%(\%(var\|const\|let\)\s\+\)\?\([[:alnum:]_$]\+\)\s*=\s*\)\?({\?\([^>]\{-}\)}\?)\%(\s*:\s*(\?\([[:alnum:][:space:]_[\].,|<>]\+\))\?\)\?\s*=>\s*[{(]',
\ 'match_group_names': ['funcName', 'parameters', 'returnType'],
\ 'parameters': {
\ 'match': '\m\%(\%(public\|private\|protected\)\?\s*\)\?\([[:alnum:]_$]\+\)\%(\s*:\s*\([[:alnum:][:space:]._|]\+\%(\[[[:alnum:][:space:]_[\],]*\]\)\?\)\)\?\%(\s*=\s*\([^,]\+\)\+\)\?',
\ 'match_group_names': ['name', 'type', 'default'],
\ 'format': ['@param', '!{{type|*}}', '{name}', '- TODO'],
\ },
\ 'comment': {
\ 'insert': 'above',
\ 'trim_comparision_check': 0,
\ 'template': [
\ '/**',
\ ' * @function {funcName|}',
\ ' * @description TODO',
\ ' * {parameters}',
\ '! * @return {{returnType}} TODO',
\ ' */',
\ ],
\ },
\ })
\ 'match': '\m^\%(\%(\%(var\|const\|let\)\s\+\)\?\([[:alnum:]_$]\+\)\s*=\s*\)\?({\?\([^>]\{-}\)}\?)\%(\s*:\s*(\?\([[:alnum:][:space:]_[\].,|<>]\+\))\?\)\?\s*=>\s*[{(]',
\ 'match_group_names': ['funcName', 'parameters', 'returnType'],
\ 'parameters': {
\ 'match': '\m\%(\%(public\|private\|protected\)\?\s*\)\?\([[:alnum:]_$]\+\)\%(\s*:\s*\([[:alnum:][:space:]._|]\+\%(\[[[:alnum:][:space:]_[\],]*\]\)\?\)\)\?\%(\s*=\s*\([^,]\+\)\+\)\?',
\ 'match_group_names': ['name', 'type', 'default'],
\ 'format': ['@param', '!{{type|*}}', '{name}', '- TODO'],
\ },
\ 'comment': {
\ 'insert': 'above',
\ 'trim_comparision_check': 0,
\ 'template': [
\ '/**',
\ ' * @function {funcName|}',
\ ' * @description TODO',
\ ' * {parameters}',
\ '! * @return {{returnType}} TODO',
\ ' */',
\ ],
\ },
\})

""
" ==============================================================================
Expand Down Expand Up @@ -314,26 +314,26 @@ call add(b:doge_patterns, {
" The group for the default value is a capturing group which may contain 1
" or more of the following characters: '[^,]'.
call add(b:doge_patterns, {
\ 'match': '\m^\%(export\s\+\)\?\%(function\s*\)\?\([[:alnum:]_$]\+\)\?\%(<[[:alnum:][:space:]_,]*>\)\?(\([^>]\{-}\))\%(\s*:\s*(\?\([[:alnum:][:space:]_[\].,|<>]\+\))\?\)\?\s*[{(]',
\ 'match_group_names': ['funcName', 'parameters', 'returnType'],
\ 'parameters': {
\ 'match': '\m\%(\%(public\|private\|protected\)\?\s*\)\([[:alnum:]_$]\+\)\%(\s*:\s*\([[:alnum:][:space:]._|]\+\%(\[[[:alnum:][:space:]_[\],]*\]\)\?\)\)\?\%(\s*=\s*\([^,]\+\)\+\)\?',
\ 'match_group_names': ['name', 'type', 'default'],
\ 'format': ['@param', '!{{type|*}}', '{name}', '- TODO'],
\ },
\ 'comment': {
\ 'insert': 'above',
\ 'trim_comparision_check': 0,
\ 'template': [
\ '/**',
\ ' * @function {funcName|}',
\ ' * @description TODO',
\ ' * {parameters}',
\ '! * @return {{returnType}} TODO',
\ ' */',
\ ],
\ },
\ })
\ 'match': '\m^\%(export\s\+\)\?\%(function\s*\)\?\([[:alnum:]_$]\+\)\?\%(<[[:alnum:][:space:]_,]*>\)\?(\([^>]\{-}\))\%(\s*:\s*(\?\([[:alnum:][:space:]_[\].,|<>]\+\))\?\)\?\s*[{(]',
\ 'match_group_names': ['funcName', 'parameters', 'returnType'],
\ 'parameters': {
\ 'match': '\m\%(\%(public\|private\|protected\)\?\s*\)\([[:alnum:]_$]\+\)\%(\s*:\s*\([[:alnum:][:space:]._|]\+\%(\[[[:alnum:][:space:]_[\],]*\]\)\?\)\)\?\%(\s*=\s*\([^,]\+\)\+\)\?',
\ 'match_group_names': ['name', 'type', 'default'],
\ 'format': ['@param', '!{{type|*}}', '{name}', '- TODO'],
\ },
\ 'comment': {
\ 'insert': 'above',
\ 'trim_comparision_check': 0,
\ 'template': [
\ '/**',
\ ' * @function {funcName|}',
\ ' * @description TODO',
\ ' * {parameters}',
\ '! * @return {{returnType}} TODO',
\ ' */',
\ ],
\ },
\})

let &cpoptions = s:save_cpo
unlet s:save_cpo
Loading

0 comments on commit 9522f3e

Please sign in to comment.