]> git.wincent.com - docvim.git/commitdiff
Add vim-docvim to integration tests
authorGreg Hurrell <greg@hurrell.net>
Sun, 12 Jun 2016 21:48:26 +0000 (14:48 -0700)
committerGreg Hurrell <greg@hurrell.net>
Sun, 12 Jun 2016 21:48:26 +0000 (14:48 -0700)
README.md
bin/get
bin/put
tests/fixtures/integration/vim-docvim/golden/ast.golden [new file with mode: 0644]
tests/fixtures/integration/vim-docvim/golden/markdown.golden [new file with mode: 0644]
tests/fixtures/integration/vim-docvim/golden/plaintext.golden [new file with mode: 0644]
tests/fixtures/integration/vim-docvim/input/LICENSE.md [new file with mode: 0644]
tests/fixtures/integration/vim-docvim/input/after/syntax/vim.vim [new file with mode: 0644]
tests/fixtures/integration/vim-docvim/input/ftplugin/vim.vim [new file with mode: 0644]

index 89e5f19d4c507187a1539c955fac32ea540c14b7..9553285bbceee597be5a5d3fc34cfc031c0c338b 100644 (file)
--- a/README.md
+++ b/README.md
@@ -226,6 +226,12 @@ cabal upload dist/docvim-$VERSION.tar.gz
 
 - [Hackage package](https://hackage.haskell.org/package/docvim)
 
+### Examples of plug-ins using docvim
+
+- [Ferret](https://github.com/wincent/ferret)
+- [Scalpel](https://github.com/wincent/scalpel)
+- [vim-docvim](https://github.com/wincent/vim-docvim)
+
 ## FAQ
 
 ### Why a new tool and not an existing one like [Vimdoc]?
@@ -235,14 +241,14 @@ cabal upload dist/docvim-$VERSION.tar.gz
 * It's fun to build new things from scratch.
 * The project is a great fit for my learn-me-a-Haskell goal this year.
 
-### Why is it called "Docvim"?
+### Why is it called "docvim"?
 
 "Vimdoc" was the first name that occurred to me when I started this project, but:
 
 * The number one hit for "vimdoc" is [this online copy of Vim's own documentation](http://vimdoc.sourceforge.net/).
 * The name "Vimdoc" is already taken by [a similar project](https://github.com/google/vimdoc).
 
-So, in a remarkable flash of profound creativity, I settled on "Docvim" instead, which right now yields this pleasing search result:
+So, in a remarkable flash of profound creativity, I settled on "docvim" instead, which right now yields this pleasing search result:
 
 > Did you mean: dacvim
 
diff --git a/bin/get b/bin/get
index a0de464518aabae8c497bde5083a78d7339cba59..ea034083f9719fd3dc5a7e147f16e53eb564790e 100755 (executable)
--- a/bin/get
+++ b/bin/get
@@ -11,10 +11,11 @@ usage() {
   echo
   echo "Usage:"
   echo
-  echo "  bin/get ferret   # freshen a specific source"
-  echo "  bin/get scalpel"
-  echo "  --------------------------------------------"
-  echo "  bin/get all      # freshen all sources"
+  echo "  bin/get ferret      #"
+  echo "  bin/put scalpel     # freshen a specific downstream"
+  echo "  bin/get vim-docvim  #"
+  echo "  ---------------------------------------------------"
+  echo "  bin/get all         # freshen all sources"
   exit
 }
 
@@ -24,6 +25,7 @@ update() {
   echo "Updating $PROJECT"
   git --git-dir "../$PROJECT/.git" archive --prefix="$PROJECT/input/" master \
     | tar -x -C tests/fixtures/integration -f -
+  mkdir -p "tests/fixtures/integration/$PROJECT/golden"
 }
 
 if [ $# -eq 0 ]; then
@@ -34,10 +36,11 @@ else
     shift
     case $PROJECT in
       all)
-        update "ferret"
-        update "scalpel"
+        update ferret
+        update scalpel
+        update vim-docvim
         ;;
-      ferret|scalpel)
+      ferret|scalpel|vim-docvim)
         update "$PROJECT"
         ;;
       *)
diff --git a/bin/put b/bin/put
index fe9d7bbcfff9d0307eda5d5863f0810a1386329e..1ee4387c5ca58d7a1dbf6d9c45b00e88788ccbca 100755 (executable)
--- a/bin/put
+++ b/bin/put
@@ -17,10 +17,11 @@ usage() {
   echo
   echo "Usage:"
   echo
-  echo "  bin/put ferret   # freshen a specific downstream"
-  echo "  bin/put scalpel"
-  echo "  ------------------------------------------------"
-  echo "  bin/put all      # freshen all downstreams"
+  echo "  bin/put ferret      #"
+  echo "  bin/put scalpel     # freshen a specific downstream"
+  echo "  bin/put vim-docvim  #"
+  echo "  ---------------------------------------------------"
+  echo "  bin/put all         # freshen all downstreams"
   exit
 }
 
@@ -30,6 +31,7 @@ update() {
   echo "Updating $PROJECT"
   cp "tests/fixtures/integration/$PROJECT/golden/markdown.golden" \
     "../$PROJECT/README.md"
+  mkdir -p "../$PROJECT/doc"
   cp "tests/fixtures/integration/$PROJECT/golden/plaintext.golden" \
     "../$PROJECT/doc/$PROJECT.txt"
 }
@@ -44,8 +46,9 @@ else
       all)
         update "ferret"
         update "scalpel"
+        update "vim-docvim"
         ;;
-      ferret|scalpel)
+      ferret|scalpel|vim-docvim)
         update "$PROJECT"
         ;;
       *)
diff --git a/tests/fixtures/integration/vim-docvim/golden/ast.golden b/tests/fixtures/integration/vim-docvim/golden/ast.golden
new file mode 100644 (file)
index 0000000..e976df5
--- /dev/null
@@ -0,0 +1,1081 @@
+Project
+  [ DocBlock
+      [ PluginAnnotation
+          "docvim" "Syntax highlighting for docvim comments"
+      , TOC
+          [ "Intro"
+          , "Installation"
+          , "Related"
+          , "Website"
+          , "License"
+          , "Development"
+          , "Authors"
+          , "History"
+          ]
+      ]
+  , LinkTargets [ "vim-docvim" ]
+  , HeadingAnnotation "Intro"
+  , Paragraph
+      [ Plaintext "vim-docvim"
+      , Whitespace
+      , Plaintext "provides"
+      , Whitespace
+      , Plaintext "additional"
+      , Whitespace
+      , Plaintext "syntax"
+      , Whitespace
+      , Plaintext "highlighting"
+      , Whitespace
+      , Plaintext "for"
+      , Whitespace
+      , Plaintext "Vim"
+      , Whitespace
+      , Plaintext "script"
+      , Whitespace
+      , Plaintext "files"
+      , Whitespace
+      , Plaintext "that"
+      , Whitespace
+      , Plaintext "contain"
+      , Whitespace
+      , Plaintext "embedded"
+      , Whitespace
+      , Plaintext "docvim"
+      , Whitespace
+      , Plaintext "comments."
+      ]
+  , Paragraph
+      [ Plaintext "docvim"
+      , Whitespace
+      , Plaintext "(the"
+      , Whitespace
+      , Plaintext "tool,"
+      , Whitespace
+      , Plaintext "not"
+      , Whitespace
+      , Plaintext "this"
+      , Whitespace
+      , Plaintext "plug-in)"
+      , Whitespace
+      , Plaintext "is"
+      , Whitespace
+      , Plaintext "a"
+      , Whitespace
+      , Plaintext "documentation"
+      , Whitespace
+      , Plaintext "generator"
+      , Whitespace
+      , Plaintext "that"
+      , Whitespace
+      , Plaintext "processes"
+      , Whitespace
+      , Plaintext "those"
+      , Whitespace
+      , Plaintext "embedded"
+      , Whitespace
+      , Plaintext "comments"
+      , Whitespace
+      , Plaintext "and"
+      , Whitespace
+      , Plaintext "produces"
+      , Whitespace
+      , Plaintext "documentation"
+      , Whitespace
+      , Plaintext "in"
+      , Whitespace
+      , Plaintext "Markdown"
+      , Whitespace
+      , Plaintext "and"
+      , Whitespace
+      , Plaintext "Vim"
+      , Whitespace
+      , Plaintext "\"help\""
+      , Whitespace
+      , Plaintext "formats."
+      , Whitespace
+      , Plaintext "To"
+      , Whitespace
+      , Plaintext "avoid"
+      , Whitespace
+      , Plaintext "confusion,"
+      , Whitespace
+      , Plaintext "this"
+      , Whitespace
+      , Plaintext "document"
+      , Whitespace
+      , Plaintext "refers"
+      , Whitespace
+      , Plaintext "to"
+      , Whitespace
+      , Plaintext "the"
+      , Whitespace
+      , Plaintext "Vim"
+      , Whitespace
+      , Plaintext "plug-in"
+      , Whitespace
+      , Plaintext "as"
+      , Whitespace
+      , Plaintext "\"vim-docvim\""
+      , Whitespace
+      , Plaintext "and"
+      , Whitespace
+      , Plaintext "the"
+      , Whitespace
+      , Plaintext "separate"
+      , Whitespace
+      , Plaintext "generation"
+      , Whitespace
+      , Plaintext "tool"
+      , Whitespace
+      , Plaintext "as"
+      , Whitespace
+      , Plaintext "\"docvim\"."
+      ]
+  , HeadingAnnotation "Installation"
+  , Paragraph
+      [ Plaintext "To"
+      , Whitespace
+      , Plaintext "install"
+      , Whitespace
+      , Plaintext "vim-docvim,"
+      , Whitespace
+      , Plaintext "use"
+      , Whitespace
+      , Plaintext "your"
+      , Whitespace
+      , Plaintext "plug-in"
+      , Whitespace
+      , Plaintext "management"
+      , Whitespace
+      , Plaintext "system"
+      , Whitespace
+      , Plaintext "of"
+      , Whitespace
+      , Plaintext "choice."
+      ]
+  , Paragraph
+      [ Plaintext "If"
+      , Whitespace
+      , Plaintext "you"
+      , Whitespace
+      , Plaintext "don't"
+      , Whitespace
+      , Plaintext "have"
+      , Whitespace
+      , Plaintext "a"
+      , Whitespace
+      , Plaintext "\"plug-in"
+      , Whitespace
+      , Plaintext "management"
+      , Whitespace
+      , Plaintext "system"
+      , Whitespace
+      , Plaintext "of"
+      , Whitespace
+      , Plaintext "choice\","
+      , Whitespace
+      , Plaintext "I"
+      , Whitespace
+      , Plaintext "recommend"
+      , Whitespace
+      , Plaintext "Pathogen"
+      , Whitespace
+      , Plaintext "(https://github.com/tpope/vim-pathogen)"
+      , Whitespace
+      , Plaintext "due"
+      , Whitespace
+      , Plaintext "to"
+      , Whitespace
+      , Plaintext "its"
+      , Whitespace
+      , Plaintext "simplicity"
+      , Whitespace
+      , Plaintext "and"
+      , Whitespace
+      , Plaintext "robustness."
+      , Whitespace
+      , Plaintext "Assuming"
+      , Whitespace
+      , Plaintext "that"
+      , Whitespace
+      , Plaintext "you"
+      , Whitespace
+      , Plaintext "have"
+      , Whitespace
+      , Plaintext "Pathogen"
+      , Whitespace
+      , Plaintext "installed"
+      , Whitespace
+      , Plaintext "and"
+      , Whitespace
+      , Plaintext "configured,"
+      , Whitespace
+      , Plaintext "and"
+      , Whitespace
+      , Plaintext "that"
+      , Whitespace
+      , Plaintext "you"
+      , Whitespace
+      , Plaintext "want"
+      , Whitespace
+      , Plaintext "to"
+      , Whitespace
+      , Plaintext "install"
+      , Whitespace
+      , Plaintext "vim-docvim"
+      , Whitespace
+      , Plaintext "into"
+      , Whitespace
+      , Code "~/.vim/bundle"
+      , Plaintext ","
+      , Whitespace
+      , Plaintext "you"
+      , Whitespace
+      , Plaintext "can"
+      , Whitespace
+      , Plaintext "do"
+      , Whitespace
+      , Plaintext "so"
+      , Whitespace
+      , Plaintext "with:"
+      ]
+  , Fenced
+      [ "git clone https://github.com/wincent/vim-docvim.git ~/.vim/bundle/vim-docvim"
+      ]
+  , Paragraph
+      [ Plaintext "Alternatively,"
+      , Whitespace
+      , Plaintext "if"
+      , Whitespace
+      , Plaintext "you"
+      , Whitespace
+      , Plaintext "use"
+      , Whitespace
+      , Plaintext "a"
+      , Whitespace
+      , Plaintext "Git"
+      , Whitespace
+      , Plaintext "submodule"
+      , Whitespace
+      , Plaintext "for"
+      , Whitespace
+      , Plaintext "each"
+      , Whitespace
+      , Plaintext "Vim"
+      , Whitespace
+      , Plaintext "plug-in,"
+      , Whitespace
+      , Plaintext "you"
+      , Whitespace
+      , Plaintext "could"
+      , Whitespace
+      , Plaintext "do"
+      , Whitespace
+      , Plaintext "the"
+      , Whitespace
+      , Plaintext "following"
+      , Whitespace
+      , Plaintext "after"
+      , Whitespace
+      , Code "cd"
+      , Plaintext "-ing"
+      , Whitespace
+      , Plaintext "into"
+      , Whitespace
+      , Plaintext "the"
+      , Whitespace
+      , Plaintext "top-level"
+      , Whitespace
+      , Plaintext "of"
+      , Whitespace
+      , Plaintext "your"
+      , Whitespace
+      , Plaintext "Git"
+      , Whitespace
+      , Plaintext "superproject:"
+      ]
+  , Fenced
+      [ "git submodule add https://github.com/wincent/vim-docvim.git ~/vim/bundle/vim-docvim"
+      , "git submodule init"
+      ]
+  , Paragraph
+      [ Plaintext "To"
+      , Whitespace
+      , Plaintext "generate"
+      , Whitespace
+      , Plaintext "help"
+      , Whitespace
+      , Plaintext "tags"
+      , Whitespace
+      , Plaintext "under"
+      , Whitespace
+      , Plaintext "Pathogen,"
+      , Whitespace
+      , Plaintext "you"
+      , Whitespace
+      , Plaintext "can"
+      , Whitespace
+      , Plaintext "do"
+      , Whitespace
+      , Plaintext "so"
+      , Whitespace
+      , Plaintext "from"
+      , Whitespace
+      , Plaintext "inside"
+      , Whitespace
+      , Plaintext "Vim"
+      , Whitespace
+      , Plaintext "with:"
+      ]
+  , Fenced [ ":call pathogen#helptags()" ]
+  , HeadingAnnotation "Related"
+  , SubheadingAnnotation "Docvim"
+  , Paragraph
+      [ Plaintext "The"
+      , Whitespace
+      , Plaintext "Docvim"
+      , Whitespace
+      , Plaintext "tool"
+      , Whitespace
+      , Plaintext "itself"
+      , Whitespace
+      , Plaintext "is"
+      , Whitespace
+      , Plaintext "a"
+      , Whitespace
+      , Plaintext "Haskell"
+      , Whitespace
+      , Plaintext "module,"
+      , Whitespace
+      , Plaintext "available"
+      , Whitespace
+      , Plaintext "at:"
+      ]
+  , Paragraph
+      [ Plaintext "http://hackage.haskell.org/package/docvim" ]
+  , Paragraph
+      [ Plaintext "The"
+      , Whitespace
+      , Plaintext "official"
+      , Whitespace
+      , Plaintext "source"
+      , Whitespace
+      , Plaintext "code"
+      , Whitespace
+      , Plaintext "repo"
+      , Whitespace
+      , Plaintext "is"
+      , Whitespace
+      , Plaintext "at:"
+      ]
+  , Paragraph [ Plaintext "http://git.wincent.com/docvim.git" ]
+  , Paragraph
+      [ Plaintext "Mirrors"
+      , Whitespace
+      , Plaintext "exist"
+      , Whitespace
+      , Plaintext "at:"
+      ]
+  , List
+      [ ListItem [ Plaintext "https://github.com/wincent/docvim" ]
+      , ListItem [ Plaintext "https://gitlab.com/wincent/docvim" ]
+      , ListItem [ Plaintext "https://bitbucket.org/ghurrell/docvim" ]
+      ]
+  , HeadingAnnotation "Website"
+  , Paragraph
+      [ Plaintext "The"
+      , Whitespace
+      , Plaintext "official"
+      , Whitespace
+      , Plaintext "vim-docvim"
+      , Whitespace
+      , Plaintext "source"
+      , Whitespace
+      , Plaintext "code"
+      , Whitespace
+      , Plaintext "repo"
+      , Whitespace
+      , Plaintext "is"
+      , Whitespace
+      , Plaintext "at:"
+      ]
+  , Paragraph [ Plaintext "http://git.wincent.com/vim-docvim.git" ]
+  , Paragraph
+      [ Plaintext "Mirrors"
+      , Whitespace
+      , Plaintext "exist"
+      , Whitespace
+      , Plaintext "at:"
+      ]
+  , List
+      [ ListItem [ Plaintext "https://github.com/wincent/vim-docvim" ]
+      , ListItem [ Plaintext "https://gitlab.com/wincent/vim-docvim" ]
+      , ListItem
+          [ Plaintext "https://bitbucket.org/ghurrell/vim-docvim" ]
+      ]
+  , Paragraph
+      [ Plaintext "Official"
+      , Whitespace
+      , Plaintext "releases"
+      , Whitespace
+      , Plaintext "are"
+      , Whitespace
+      , Plaintext "listed"
+      , Whitespace
+      , Plaintext "at:"
+      ]
+  , Paragraph
+      [ Plaintext
+          "http://www.vim.org/scripts/script.php?script_id=[TODO]"
+      ]
+  , HeadingAnnotation "License"
+  , Paragraph
+      [ Plaintext "Copyright"
+      , Whitespace
+      , Plaintext "(c)"
+      , Whitespace
+      , Plaintext "2015-present"
+      , Whitespace
+      , Plaintext "Greg"
+      , Whitespace
+      , Plaintext "Hurrell"
+      ]
+  , Paragraph
+      [ Plaintext "Permission"
+      , Whitespace
+      , Plaintext "is"
+      , Whitespace
+      , Plaintext "hereby"
+      , Whitespace
+      , Plaintext "granted,"
+      , Whitespace
+      , Plaintext "free"
+      , Whitespace
+      , Plaintext "of"
+      , Whitespace
+      , Plaintext "charge,"
+      , Whitespace
+      , Plaintext "to"
+      , Whitespace
+      , Plaintext "any"
+      , Whitespace
+      , Plaintext "person"
+      , Whitespace
+      , Plaintext "obtaining"
+      , Whitespace
+      , Plaintext "a"
+      , Whitespace
+      , Plaintext "copy"
+      , Whitespace
+      , Plaintext "of"
+      , Whitespace
+      , Plaintext "this"
+      , Whitespace
+      , Plaintext "software"
+      , Whitespace
+      , Plaintext "and"
+      , Whitespace
+      , Plaintext "associated"
+      , Whitespace
+      , Plaintext "documentation"
+      , Whitespace
+      , Plaintext "files"
+      , Whitespace
+      , Plaintext "(the"
+      , Whitespace
+      , Plaintext "\"Software\"),"
+      , Whitespace
+      , Plaintext "to"
+      , Whitespace
+      , Plaintext "deal"
+      , Whitespace
+      , Plaintext "in"
+      , Whitespace
+      , Plaintext "the"
+      , Whitespace
+      , Plaintext "Software"
+      , Whitespace
+      , Plaintext "without"
+      , Whitespace
+      , Plaintext "restriction,"
+      , Whitespace
+      , Plaintext "including"
+      , Whitespace
+      , Plaintext "without"
+      , Whitespace
+      , Plaintext "limitation"
+      , Whitespace
+      , Plaintext "the"
+      , Whitespace
+      , Plaintext "rights"
+      , Whitespace
+      , Plaintext "to"
+      , Whitespace
+      , Plaintext "use,"
+      , Whitespace
+      , Plaintext "copy,"
+      , Whitespace
+      , Plaintext "modify,"
+      , Whitespace
+      , Plaintext "merge,"
+      , Whitespace
+      , Plaintext "publish,"
+      , Whitespace
+      , Plaintext "distribute,"
+      , Whitespace
+      , Plaintext "sublicense,"
+      , Whitespace
+      , Plaintext "and/or"
+      , Whitespace
+      , Plaintext "sell"
+      , Whitespace
+      , Plaintext "copies"
+      , Whitespace
+      , Plaintext "of"
+      , Whitespace
+      , Plaintext "the"
+      , Whitespace
+      , Plaintext "Software,"
+      , Whitespace
+      , Plaintext "and"
+      , Whitespace
+      , Plaintext "to"
+      , Whitespace
+      , Plaintext "permit"
+      , Whitespace
+      , Plaintext "persons"
+      , Whitespace
+      , Plaintext "to"
+      , Whitespace
+      , Plaintext "whom"
+      , Whitespace
+      , Plaintext "the"
+      , Whitespace
+      , Plaintext "Software"
+      , Whitespace
+      , Plaintext "is"
+      , Whitespace
+      , Plaintext "furnished"
+      , Whitespace
+      , Plaintext "to"
+      , Whitespace
+      , Plaintext "do"
+      , Whitespace
+      , Plaintext "so,"
+      , Whitespace
+      , Plaintext "subject"
+      , Whitespace
+      , Plaintext "to"
+      , Whitespace
+      , Plaintext "the"
+      , Whitespace
+      , Plaintext "following"
+      , Whitespace
+      , Plaintext "conditions:"
+      ]
+  , Paragraph
+      [ Plaintext "The"
+      , Whitespace
+      , Plaintext "above"
+      , Whitespace
+      , Plaintext "copyright"
+      , Whitespace
+      , Plaintext "notice"
+      , Whitespace
+      , Plaintext "and"
+      , Whitespace
+      , Plaintext "this"
+      , Whitespace
+      , Plaintext "permission"
+      , Whitespace
+      , Plaintext "notice"
+      , Whitespace
+      , Plaintext "shall"
+      , Whitespace
+      , Plaintext "be"
+      , Whitespace
+      , Plaintext "included"
+      , Whitespace
+      , Plaintext "in"
+      , Whitespace
+      , Plaintext "all"
+      , Whitespace
+      , Plaintext "copies"
+      , Whitespace
+      , Plaintext "or"
+      , Whitespace
+      , Plaintext "substantial"
+      , Whitespace
+      , Plaintext "portions"
+      , Whitespace
+      , Plaintext "of"
+      , Whitespace
+      , Plaintext "the"
+      , Whitespace
+      , Plaintext "Software."
+      ]
+  , Paragraph
+      [ Plaintext "THE"
+      , Whitespace
+      , Plaintext "SOFTWARE"
+      , Whitespace
+      , Plaintext "IS"
+      , Whitespace
+      , Plaintext "PROVIDED"
+      , Whitespace
+      , Plaintext "\"AS"
+      , Whitespace
+      , Plaintext "IS\","
+      , Whitespace
+      , Plaintext "WITHOUT"
+      , Whitespace
+      , Plaintext "WARRANTY"
+      , Whitespace
+      , Plaintext "OF"
+      , Whitespace
+      , Plaintext "ANY"
+      , Whitespace
+      , Plaintext "KIND,"
+      , Whitespace
+      , Plaintext "EXPRESS"
+      , Whitespace
+      , Plaintext "OR"
+      , Whitespace
+      , Plaintext "IMPLIED,"
+      , Whitespace
+      , Plaintext "INCLUDING"
+      , Whitespace
+      , Plaintext "BUT"
+      , Whitespace
+      , Plaintext "NOT"
+      , Whitespace
+      , Plaintext "LIMITED"
+      , Whitespace
+      , Plaintext "TO"
+      , Whitespace
+      , Plaintext "THE"
+      , Whitespace
+      , Plaintext "WARRANTIES"
+      , Whitespace
+      , Plaintext "OF"
+      , Whitespace
+      , Plaintext "MERCHANTABILITY,"
+      , Whitespace
+      , Plaintext "FITNESS"
+      , Whitespace
+      , Plaintext "FOR"
+      , Whitespace
+      , Plaintext "A"
+      , Whitespace
+      , Plaintext "PARTICULAR"
+      , Whitespace
+      , Plaintext "PURPOSE"
+      , Whitespace
+      , Plaintext "AND"
+      , Whitespace
+      , Plaintext "NONINFRINGEMENT."
+      , Whitespace
+      , Plaintext "IN"
+      , Whitespace
+      , Plaintext "NO"
+      , Whitespace
+      , Plaintext "EVENT"
+      , Whitespace
+      , Plaintext "SHALL"
+      , Whitespace
+      , Plaintext "THE"
+      , Whitespace
+      , Plaintext "AUTHORS"
+      , Whitespace
+      , Plaintext "OR"
+      , Whitespace
+      , Plaintext "COPYRIGHT"
+      , Whitespace
+      , Plaintext "HOLDERS"
+      , Whitespace
+      , Plaintext "BE"
+      , Whitespace
+      , Plaintext "LIABLE"
+      , Whitespace
+      , Plaintext "FOR"
+      , Whitespace
+      , Plaintext "ANY"
+      , Whitespace
+      , Plaintext "CLAIM,"
+      , Whitespace
+      , Plaintext "DAMAGES"
+      , Whitespace
+      , Plaintext "OR"
+      , Whitespace
+      , Plaintext "OTHER"
+      , Whitespace
+      , Plaintext "LIABILITY,"
+      , Whitespace
+      , Plaintext "WHETHER"
+      , Whitespace
+      , Plaintext "IN"
+      , Whitespace
+      , Plaintext "AN"
+      , Whitespace
+      , Plaintext "ACTION"
+      , Whitespace
+      , Plaintext "OF"
+      , Whitespace
+      , Plaintext "CONTRACT,"
+      , Whitespace
+      , Plaintext "TORT"
+      , Whitespace
+      , Plaintext "OR"
+      , Whitespace
+      , Plaintext "OTHERWISE,"
+      , Whitespace
+      , Plaintext "ARISING"
+      , Whitespace
+      , Plaintext "FROM,"
+      , Whitespace
+      , Plaintext "OUT"
+      , Whitespace
+      , Plaintext "OF"
+      , Whitespace
+      , Plaintext "OR"
+      , Whitespace
+      , Plaintext "IN"
+      , Whitespace
+      , Plaintext "CONNECTION"
+      , Whitespace
+      , Plaintext "WITH"
+      , Whitespace
+      , Plaintext "THE"
+      , Whitespace
+      , Plaintext "SOFTWARE"
+      , Whitespace
+      , Plaintext "OR"
+      , Whitespace
+      , Plaintext "THE"
+      , Whitespace
+      , Plaintext "USE"
+      , Whitespace
+      , Plaintext "OR"
+      , Whitespace
+      , Plaintext "OTHER"
+      , Whitespace
+      , Plaintext "DEALINGS"
+      , Whitespace
+      , Plaintext "IN"
+      , Whitespace
+      , Plaintext "THE"
+      , Whitespace
+      , Plaintext "SOFTWARE."
+      ]
+  , HeadingAnnotation "Development"
+  , SubheadingAnnotation "Contributing patches"
+  , Paragraph
+      [ Plaintext "Patches"
+      , Whitespace
+      , Plaintext "can"
+      , Whitespace
+      , Plaintext "be"
+      , Whitespace
+      , Plaintext "sent"
+      , Whitespace
+      , Plaintext "via"
+      , Whitespace
+      , Plaintext "mail"
+      , Whitespace
+      , Plaintext "to"
+      , Whitespace
+      , Plaintext "greg@hurrell.net,"
+      , Whitespace
+      , Plaintext "or"
+      , Whitespace
+      , Plaintext "as"
+      , Whitespace
+      , Plaintext "GitHub"
+      , Whitespace
+      , Plaintext "pull"
+      , Whitespace
+      , Plaintext "requests"
+      , Whitespace
+      , Plaintext "at:"
+      , Whitespace
+      , Plaintext "https://github.com/wincent/vim-docvim/pulls"
+      ]
+  , SubheadingAnnotation "Cutting a new release"
+  , Paragraph
+      [ Plaintext "At"
+      , Whitespace
+      , Plaintext "the"
+      , Whitespace
+      , Plaintext "moment"
+      , Whitespace
+      , Plaintext "the"
+      , Whitespace
+      , Plaintext "release"
+      , Whitespace
+      , Plaintext "process"
+      , Whitespace
+      , Plaintext "is"
+      , Whitespace
+      , Plaintext "manual:"
+      ]
+  , List
+      [ ListItem
+          [ Plaintext "Perform"
+          , Whitespace
+          , Plaintext "final"
+          , Whitespace
+          , Plaintext "sanity"
+          , Whitespace
+          , Plaintext "checks"
+          , Whitespace
+          , Plaintext "and"
+          , Whitespace
+          , Plaintext "manual"
+          , Whitespace
+          , Plaintext "testing"
+          ]
+      , ListItem
+          [ Plaintext "Update"
+          , Whitespace
+          , Plaintext "the"
+          , Whitespace
+          , Link "docvim-history"
+          , Whitespace
+          , Plaintext "section"
+          , Whitespace
+          , Plaintext "of"
+          , Whitespace
+          , Plaintext "the"
+          , Whitespace
+          , Plaintext "documentation"
+          ]
+      , ListItem
+          [ Plaintext "Verify"
+          , Whitespace
+          , Plaintext "clean"
+          , Whitespace
+          , Plaintext "work"
+          , Whitespace
+          , Plaintext "tree:"
+          ]
+      ]
+  , Fenced [ "git status" ]
+  , List
+      [ ListItem
+          [ Plaintext "Tag"
+          , Whitespace
+          , Plaintext "the"
+          , Whitespace
+          , Plaintext "release:"
+          ]
+      ]
+  , Fenced [ "git tag -s -m \"$VERSION release\" $VERSION" ]
+  , List
+      [ ListItem
+          [ Plaintext "Publish"
+          , Whitespace
+          , Plaintext "the"
+          , Whitespace
+          , Plaintext "code:"
+          ]
+      ]
+  , Fenced
+      [ "git push origin master --follow-tags"
+      , "git push github master --follow-tags"
+      ]
+  , List
+      [ ListItem
+          [ Plaintext "Produce"
+          , Whitespace
+          , Plaintext "the"
+          , Whitespace
+          , Plaintext "release"
+          , Whitespace
+          , Plaintext "archive:"
+          ]
+      ]
+  , Fenced [ "git archive -o vim-docvim-$VERSION.zip HEAD -- ." ]
+  , List
+      [ ListItem
+          [ Plaintext "Upload"
+          , Whitespace
+          , Plaintext "to"
+          , Whitespace
+          , Plaintext
+              "http://www.vim.org/scripts/script.php?script_id=[TODO]"
+          ]
+      ]
+  , HeadingAnnotation "Authors"
+  , Paragraph
+      [ Plaintext "vim-docvim"
+      , Whitespace
+      , Plaintext "is"
+      , Whitespace
+      , Plaintext "written"
+      , Whitespace
+      , Plaintext "and"
+      , Whitespace
+      , Plaintext "maintained"
+      , Whitespace
+      , Plaintext "by"
+      , Whitespace
+      , Plaintext "Greg"
+      , Whitespace
+      , Plaintext "Hurrell"
+      , Whitespace
+      , Plaintext "<greg@hurrell.net>."
+      ]
+  , HeadingAnnotation "History"
+  , SubheadingAnnotation "0.1 (not yet released)"
+  , List
+      [ ListItem
+          [ Plaintext "Initial" , Whitespace , Plaintext "release." ]
+      ]
+  , Project
+      [ Unit
+          [ GenericStatement
+              "syntax region docvimBlock start='\\v^\\s*\"\"' end='\\v^\\zs\\ze\\s*($|[^ \\t\"])' containedin=vimFuncBody"
+          , GenericStatement
+              "syntax region docvimPre start='\\v^\\s*\"\\s+\\zs```\\s*$' end='\\v^\\s*\"\\s+```\\s*$' containedin=docvimBlock contained keepend"
+          , GenericStatement
+              "syntax match docvimAnnotation '\\v\\@command( .+)?' containedin=docvimBlock contained"
+          , GenericStatement
+              "syntax match docvimAnnotation '@commands' containedin=docvimBlock contained"
+          , GenericStatement
+              "syntax match docvimAnnotation '@dedent' containedin=docvimBlock contained"
+          , GenericStatement
+              "syntax match docvimAnnotation '@footer' containedin=docvimBlock contained"
+          , GenericStatement
+              "syntax match docvimAnnotation '\\v\\@function( .+)?' containedin=docvimBlock contained"
+          , GenericStatement
+              "syntax match docvimAnnotation '@functions' containedin=docvimBlock contained"
+          , GenericStatement
+              "syntax match docvimAnnotation '@indent' containedin=docvimBlock contained"
+          , GenericStatement
+              "syntax match docvimAnnotation '\\v\\@mapping( .+)?' containedin=docvimBlock contained"
+          , GenericStatement
+              "syntax match docvimAnnotation '@mappings' containedin=docvimBlock contained"
+          , GenericStatement
+              "syntax match docvimAnnotation '\\v\\@option( .+)?' containedin=docvimBlock contained"
+          , GenericStatement
+              "syntax match docvimAnnotation '@options' containedin=docvimBlock contained"
+          , GenericStatement
+              "syntax match docvimAnnotation '@param' containedin=docvimBlock contained"
+          , GenericStatement
+              "syntax match docvimAnnotation '\\v\\@plugin( .+)?' containedin=docvimBlock contained"
+          , GenericStatement
+              "syntax match docvimAnnotation '@private' containedin=docvimBlock contained"
+          , GenericStatement
+              "syntax match docvimBackticks '\\v`[^\\s`]+`' containedin=docvimBlock contained"
+          , GenericStatement
+              "syntax match docvimBlockquote '\\v^\\s*\"\\s+\\zs\\>\\s+.+$' containedin=docvimBlock contained"
+          , GenericStatement
+              "syntax match docvimCrossReference '\\v\\c\\|:?[a-z0-9()<>\\.:-]+\\|' containedin=docvimBlock contained"
+          , GenericStatement
+              "syntax match docvimHeading '\\v^\\s*\"\\s+\\zs#\\s+.+$' containedin=docvimBlock contained"
+          , GenericStatement
+              "syntax match docvimPreComment '\\v^\\s*\"' containedin=docvimPre contained"
+          , GenericStatement
+              "syntax match docvimSetting \"\\v'[a-z]{2,}'\" containedin=docvimBlock contained"
+          , GenericStatement
+              "syntax match docvimSetting \"\\v't_..'\" containedin=docvimBlock contained"
+          , GenericStatement
+              "syntax match docvimSpecial '\\v\\<CSM-.\\>' containedin=docvimBlock contained"
+          , GenericStatement
+              "syntax match docvimSpecial '\\v\\<[-a-zA-Z0-9_]+\\>' containedin=docvimBlock contained"
+          , GenericStatement
+              "syntax match docvimSubheading '\\v^\\s*\"\\s+\\zs##\\s+.+$' containedin=docvimBlock contained"
+          , GenericStatement
+              "syntax match docvimTarget '\\v\\c\\*:?[a-z0-9()<>-]+\\*' containedin=docvimBlock contained"
+          , GenericStatement
+              "syntax match docvimURL `\\v<(((https?|ftp|gopher)://|(mailto|file|news):)[^' <>\"]+|(www|web|w3)[a-z0-9_-]*\\.[a-z0-9._-]+\\.[^' <>\"]+)[a-zA-Z0-9/]` containedin=docvimBlock contained"
+          , GenericStatement "if has('conceal')"
+          , GenericStatement
+              "syntax match docvimBacktick '\\v`' containedin=docvimBackticks contained conceal"
+          , GenericStatement
+              "syntax match docvimBar '\\v\\|' containedin=docvimCrossReference contained conceal"
+          , GenericStatement
+              "syntax match docvimHeadingPrefix '\\v# ' containedin=docvimHeading contained conceal"
+          , GenericStatement
+              "syntax match docvimStar '\\v\\*' containedin=docvimTarget contained conceal"
+          , GenericStatement
+              "syntax match docvimSubheadingPrefix '\\v## ' containedin=docvimSubheading contained conceal"
+          , GenericStatement "else"
+          , GenericStatement
+              "syntax match docvimBacktick '\\v`' containedin=docvimBackticks contained"
+          , GenericStatement
+              "syntax match docvimBar '\\v\\|' containedin=docvimCrossReference contained"
+          , GenericStatement
+              "syntax match docvimHeadingPrefix '\\v# ' containedin=docvimHeading contained"
+          , GenericStatement
+              "syntax match docvimStar '\\v\\*' containedin=docvimTarget contained"
+          , GenericStatement
+              "syntax match docvimSubheadingPrefix '\\v## ' containedin=docvimSubheading contained"
+          , GenericStatement "endif"
+          , FunctionDeclaration
+              { functionBang = True
+              , functionName = "s:italicize"
+              , functionArguments =
+                  ArgumentList [ Argument "name" , Argument "link" ]
+              , functionAttributes = []
+              , functionBody =
+                  [ GenericStatement "try"
+                  , GenericStatement
+                      "execute 'highlight! ' . a:name . ' ' . pinnacle#italicize(a:link)"
+                  , GenericStatement "catch"
+                  , GenericStatement
+                      "execute 'highlight! link ' . a:name . ' ' . a:link"
+                  , GenericStatement "endtry"
+                  ]
+              }
+          , FunctionDeclaration
+              { functionBang = True
+              , functionName = "s:highlight"
+              , functionArguments = ArgumentList []
+              , functionAttributes = []
+              , functionBody =
+                  [ GenericStatement "call s:italicize('docvimAnnotation', 'String')"
+                  , GenericStatement "call s:italicize('docvimBacktick', 'Comment')"
+                  , GenericStatement "call s:italicize('docvimBackticks', 'Comment')"
+                  , GenericStatement "call s:italicize('docvimBar', 'Identifier')"
+                  , GenericStatement "call s:italicize('docvimBlock', 'Normal')"
+                  , GenericStatement
+                      "call s:italicize('docvimBlockquote', 'Comment')"
+                  , GenericStatement "call s:italicize('docvimComment', 'Normal')"
+                  , GenericStatement
+                      "call s:italicize('docvimCrossReference', 'Identifier')"
+                  , GenericStatement
+                      "call s:italicize('docvimHeading', 'Identifier')"
+                  , GenericStatement
+                      "call s:italicize('docvimHeadingPrefix', 'Identifier')"
+                  , GenericStatement "call s:italicize('docvimPre', 'Comment')"
+                  , GenericStatement "call s:italicize('docvimSetting', 'Type')"
+                  , GenericStatement "call s:italicize('docvimSpecial', 'Special')"
+                  , GenericStatement "call s:italicize('docvimStar', 'String')"
+                  , GenericStatement
+                      "call s:italicize('docvimSubheading', 'PreProc')"
+                  , GenericStatement
+                      "call s:italicize('docvimSubheadingPrefix', 'PreProc')"
+                  , GenericStatement "call s:italicize('docvimTarget', 'String')"
+                  , GenericStatement "call s:italicize('docvimURL', 'String')"
+                  ]
+              }
+          , GenericStatement "if has('autocmd')"
+          , GenericStatement "augroup Docvim"
+          , GenericStatement "autocmd!"
+          , GenericStatement "autocmd ColorScheme * call s:highlight()"
+          , GenericStatement "augroup END"
+          , GenericStatement "endif"
+          , GenericStatement "call s:highlight()"
+          ]
+      , Unit
+          [ GenericStatement "set conceallevel=2"
+          , GenericStatement "set concealcursor=nc"
+          , LetStatement
+              { letLexpr = "s:path"
+              , letValue = "resolve(expand('<sfile>:p:h:h')) . '/after'"
+              }
+          , GenericStatement "execute 'set rtp+=' . s:path"
+          ]
+      ]
+  ]
diff --git a/tests/fixtures/integration/vim-docvim/golden/markdown.golden b/tests/fixtures/integration/vim-docvim/golden/markdown.golden
new file mode 100644 (file)
index 0000000..7f060b6
--- /dev/null
@@ -0,0 +1,124 @@
+# docvim<a name="docvim-docvim" href="#user-content-docvim-docvim"></a>
+
+<p align="right"><a name="vim-docvim" href="#user-content-vim-docvim"><code>vim-docvim</code></a></p>
+## Intro<a name="docvim-intro" href="#user-content-docvim-intro"></a>
+
+vim-docvim provides additional syntax highlighting for Vim script files that contain embedded docvim comments.
+
+docvim (the tool, not this plug-in) is a documentation generator that processes those embedded comments and produces documentation in Markdown and Vim "help" formats. To avoid confusion, this document refers to the Vim plug-in as "vim-docvim" and the separate generation tool as "docvim".
+
+## Installation<a name="docvim-installation" href="#user-content-docvim-installation"></a>
+
+To install vim-docvim, use your plug-in management system of choice.
+
+If you don't have a "plug-in management system of choice", I recommend Pathogen (https://github.com/tpope/vim-pathogen) due to its simplicity and robustness. Assuming that you have Pathogen installed and configured, and that you want to install vim-docvim into `~/.vim/bundle`, you can do so with:
+
+```
+git clone https://github.com/wincent/vim-docvim.git ~/.vim/bundle/vim-docvim
+```
+
+Alternatively, if you use a Git submodule for each Vim plug-in, you could do the following after `cd`-ing into the top-level of your Git superproject:
+
+```
+git submodule add https://github.com/wincent/vim-docvim.git ~/vim/bundle/vim-docvim
+git submodule init
+```
+
+To generate help tags under Pathogen, you can do so from inside Vim with:
+
+```
+:call pathogen#helptags()
+```
+
+## Related<a name="docvim-related" href="#user-content-docvim-related"></a>
+
+### Docvim<a name="docvim-docvim" href="#user-content-docvim-docvim"></a>
+
+The Docvim tool itself is a Haskell module, available at:
+
+http://hackage.haskell.org/package/docvim
+
+The official source code repo is at:
+
+http://git.wincent.com/docvim.git
+
+Mirrors exist at:
+
+- https://github.com/wincent/docvim
+- https://gitlab.com/wincent/docvim
+- https://bitbucket.org/ghurrell/docvim
+
+## Website<a name="docvim-website" href="#user-content-docvim-website"></a>
+
+The official vim-docvim source code repo is at:
+
+http://git.wincent.com/vim-docvim.git
+
+Mirrors exist at:
+
+- https://github.com/wincent/vim-docvim
+- https://gitlab.com/wincent/vim-docvim
+- https://bitbucket.org/ghurrell/vim-docvim
+
+Official releases are listed at:
+
+http://www.vim.org/scripts/script.php?script_id=[TODO]
+
+## License<a name="docvim-license" href="#user-content-docvim-license"></a>
+
+Copyright (c) 2015-present Greg Hurrell
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+## Development<a name="docvim-development" href="#user-content-docvim-development"></a>
+
+### Contributing patches<a name="docvim-contributing-patches" href="#user-content-docvim-contributing-patches"></a>
+
+Patches can be sent via mail to greg@hurrell.net, or as GitHub pull requests at: https://github.com/wincent/vim-docvim/pulls
+
+### Cutting a new release<a name="docvim-cutting-a-new-release" href="#user-content-docvim-cutting-a-new-release"></a>
+
+At the moment the release process is manual:
+
+- Perform final sanity checks and manual testing
+- Update the <strong>[`docvim-history`](#user-content-docvim-history)</strong> section of the documentation
+- Verify clean work tree:
+
+```
+git status
+```
+
+- Tag the release:
+
+```
+git tag -s -m "$VERSION release" $VERSION
+```
+
+- Publish the code:
+
+```
+git push origin master --follow-tags
+git push github master --follow-tags
+```
+
+- Produce the release archive:
+
+```
+git archive -o vim-docvim-$VERSION.zip HEAD -- .
+```
+
+- Upload to http://www.vim.org/scripts/script.php?script_id=[TODO]
+
+## Authors<a name="docvim-authors" href="#user-content-docvim-authors"></a>
+
+vim-docvim is written and maintained by Greg Hurrell <greg@hurrell.net>.
+
+## History<a name="docvim-history" href="#user-content-docvim-history"></a>
+
+### 0.1 (not yet released)<a name="docvim-01-not-yet-released" href="#user-content-docvim-01-not-yet-released"></a>
+
+- Initial release.
diff --git a/tests/fixtures/integration/vim-docvim/golden/plaintext.golden b/tests/fixtures/integration/vim-docvim/golden/plaintext.golden
new file mode 100644 (file)
index 0000000..dd2c9c2
--- /dev/null
@@ -0,0 +1,143 @@
+*docvim.txt*            Syntax highlighting for docvim comments           *docvim*
+
+CONTENTS                                                       *docvim-contents*
+
+1. Intro           |docvim-intro|
+2. Installation    |docvim-installation|
+3. Related         |docvim-related|
+4. Website         |docvim-website|
+5. License         |docvim-license|
+6. Development     |docvim-development|
+7. Authors         |docvim-authors|
+8. History         |docvim-history|
+
+
+                                                                    *vim-docvim*
+INTRO                                                             *docvim-intro*
+
+vim-docvim provides additional syntax highlighting for Vim script files that
+contain embedded docvim comments.
+
+docvim (the tool, not this plug-in) is a documentation generator that
+processes those embedded comments and produces documentation in Markdown and
+Vim "help" formats. To avoid confusion, this document refers to the Vim
+plug-in as "vim-docvim" and the separate generation tool as "docvim".
+
+INSTALLATION                                               *docvim-installation*
+
+To install vim-docvim, use your plug-in management system of choice.
+
+If you don't have a "plug-in management system of choice", I recommend
+Pathogen (https://github.com/tpope/vim-pathogen) due to its simplicity and
+robustness. Assuming that you have Pathogen installed and configured, and
+that you want to install vim-docvim into `~/.vim/bundle`, you can do so with:
+>
+    git clone https://github.com/wincent/vim-docvim.git ~/.vim/bundle/vim-docvim
+<
+Alternatively, if you use a Git submodule for each Vim plug-in, you could do
+the following after `cd`-ing into the top-level of your Git superproject:
+>
+    git submodule add https://github.com/wincent/vim-docvim.git ~/vim/bundle/vim-docvim
+    git submodule init
+<
+To generate help tags under Pathogen, you can do so from inside Vim with:
+>
+    :call pathogen#helptags()
+<
+RELATED                                                         *docvim-related*
+
+Docvim ~
+
+The Docvim tool itself is a Haskell module, available at:
+
+http://hackage.haskell.org/package/docvim
+
+The official source code repo is at:
+
+http://git.wincent.com/docvim.git
+
+Mirrors exist at:
+
+- https://github.com/wincent/docvim
+- https://gitlab.com/wincent/docvim
+- https://bitbucket.org/ghurrell/docvim
+
+WEBSITE                                                         *docvim-website*
+
+The official vim-docvim source code repo is at:
+
+http://git.wincent.com/vim-docvim.git
+
+Mirrors exist at:
+
+- https://github.com/wincent/vim-docvim
+- https://gitlab.com/wincent/vim-docvim
+- https://bitbucket.org/ghurrell/vim-docvim
+
+Official releases are listed at:
+
+http://www.vim.org/scripts/script.php?script_id=[TODO]
+
+LICENSE                                                         *docvim-license*
+
+Copyright (c) 2015-present Greg Hurrell
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+IN THE SOFTWARE.
+
+DEVELOPMENT                                                 *docvim-development*
+
+Contributing patches ~
+
+Patches can be sent via mail to greg@hurrell.net, or as GitHub pull requests
+at: https://github.com/wincent/vim-docvim/pulls
+
+Cutting a new release ~
+
+At the moment the release process is manual:
+
+- Perform final sanity checks and manual testing
+- Update the |docvim-history| section of the documentation
+- Verify clean work tree:
+>
+    git status
+<
+- Tag the release:
+>
+    git tag -s -m "$VERSION release" $VERSION
+<
+- Publish the code:
+>
+    git push origin master --follow-tags
+    git push github master --follow-tags
+<
+- Produce the release archive:
+>
+    git archive -o vim-docvim-$VERSION.zip HEAD -- .
+<
+- Upload to http://www.vim.org/scripts/script.php?script_id=[TODO]
+
+AUTHORS                                                         *docvim-authors*
+
+vim-docvim is written and maintained by Greg Hurrell <greg@hurrell.net>.
+
+HISTORY                                                         *docvim-history*
+
+0.1 (not yet released) ~
+
+- Initial release.
diff --git a/tests/fixtures/integration/vim-docvim/input/LICENSE.md b/tests/fixtures/integration/vim-docvim/input/LICENSE.md
new file mode 100644 (file)
index 0000000..176e414
--- /dev/null
@@ -0,0 +1,22 @@
+Copyright (c) 2015-present Greg Hurrell
+
+# MIT License
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/tests/fixtures/integration/vim-docvim/input/after/syntax/vim.vim b/tests/fixtures/integration/vim-docvim/input/after/syntax/vim.vim
new file mode 100644 (file)
index 0000000..958e3c8
--- /dev/null
@@ -0,0 +1,237 @@
+""
+" @plugin docvim Syntax highlighting for docvim comments
+"
+"                                                                    *vim-docvim*
+" # Intro
+"
+" vim-docvim provides additional syntax highlighting for Vim script files that
+" contain embedded docvim comments.
+"
+" docvim (the tool, not this plug-in) is a documentation generator that
+" processes those embedded comments and produces documentation in Markdown and
+" Vim "help" formats. To avoid confusion, this document refers to the Vim
+" plug-in as "vim-docvim" and the separate generation tool as "docvim".
+"
+"
+" # Installation
+"
+" To install vim-docvim, use your plug-in management system of choice.
+"
+" If you don't have a "plug-in management system of choice", I recommend
+" Pathogen (https://github.com/tpope/vim-pathogen) due to its simplicity and
+" robustness. Assuming that you have Pathogen installed and configured, and that
+" you want to install vim-docvim into `~/.vim/bundle`, you can do so with:
+"
+" ```
+" git clone https://github.com/wincent/vim-docvim.git ~/.vim/bundle/vim-docvim
+" ```
+"
+" Alternatively, if you use a Git submodule for each Vim plug-in, you could do
+" the following after `cd`-ing into the top-level of your Git superproject:
+"
+" ```
+" git submodule add https://github.com/wincent/vim-docvim.git ~/vim/bundle/vim-docvim
+" git submodule init
+" ```
+"
+" To generate help tags under Pathogen, you can do so from inside Vim with:
+"
+" ```
+" :call pathogen#helptags()
+" ```
+"
+"
+" # Related
+"
+" ## Docvim
+"
+" The Docvim tool itself is a Haskell module, available at:
+"
+"   http://hackage.haskell.org/package/docvim
+"
+" The official source code repo is at:
+"
+"   http://git.wincent.com/docvim.git
+"
+" Mirrors exist at:
+"
+"   - https://github.com/wincent/docvim
+"   - https://gitlab.com/wincent/docvim
+"   - https://bitbucket.org/ghurrell/docvim
+"
+" # Website
+"
+" The official vim-docvim source code repo is at:
+"
+"   http://git.wincent.com/vim-docvim.git
+"
+" Mirrors exist at:
+"
+"   - https://github.com/wincent/vim-docvim
+"   - https://gitlab.com/wincent/vim-docvim
+"   - https://bitbucket.org/ghurrell/vim-docvim
+"
+" Official releases are listed at:
+"
+"   http://www.vim.org/scripts/script.php?script_id=[TODO]
+"
+"
+" # License
+"
+" Copyright (c) 2015-present Greg Hurrell
+"
+" Permission is hereby granted, free of charge, to any person obtaining
+" a copy of this software and associated documentation files (the
+" "Software"), to deal in the Software without restriction, including
+" without limitation the rights to use, copy, modify, merge, publish,
+" distribute, sublicense, and/or sell copies of the Software, and to
+" permit persons to whom the Software is furnished to do so, subject to
+" the following conditions:
+"
+" The above copyright notice and this permission notice shall be
+" included in all copies or substantial portions of the Software.
+"
+" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+" NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+" LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+" OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+" WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+"
+"
+" # Development
+"
+" ## Contributing patches
+"
+" Patches can be sent via mail to greg@hurrell.net, or as GitHub pull requests
+" at: https://github.com/wincent/vim-docvim/pulls
+"
+" ## Cutting a new release
+"
+" At the moment the release process is manual:
+"
+" - Perform final sanity checks and manual testing
+" - Update the |docvim-history| section of the documentation
+" - Verify clean work tree:
+"
+" ```
+" git status
+" ```
+"
+" - Tag the release:
+"
+" ```
+" git tag -s -m "$VERSION release" $VERSION
+" ```
+"
+" - Publish the code:
+"
+" ```
+" git push origin master --follow-tags
+" git push github master --follow-tags
+" ```
+"
+" - Produce the release archive:
+"
+" ```
+" git archive -o vim-docvim-$VERSION.zip HEAD -- .
+" ```
+"
+" - Upload to http://www.vim.org/scripts/script.php?script_id=[TODO]
+"
+"
+" # Authors
+"
+" vim-docvim is written and maintained by Greg Hurrell <greg@hurrell.net>.
+"
+"
+" # History
+"
+" ## 0.1 (not yet released)
+"
+" - Initial release.
+
+syntax region docvimBlock start='\v^\s*""' end='\v^\zs\ze\s*($|[^ \t"])' containedin=vimFuncBody
+syntax region docvimPre start='\v^\s*"\s+\zs```\s*$' end='\v^\s*"\s+```\s*$' containedin=docvimBlock contained keepend
+
+syntax match docvimAnnotation '\v\@command( .+)?' containedin=docvimBlock contained
+syntax match docvimAnnotation '@commands' containedin=docvimBlock contained
+syntax match docvimAnnotation '@dedent' containedin=docvimBlock contained
+syntax match docvimAnnotation '@footer' containedin=docvimBlock contained
+syntax match docvimAnnotation '\v\@function( .+)?' containedin=docvimBlock contained
+syntax match docvimAnnotation '@functions' containedin=docvimBlock contained
+syntax match docvimAnnotation '@indent' containedin=docvimBlock contained
+syntax match docvimAnnotation '\v\@mapping( .+)?' containedin=docvimBlock contained
+syntax match docvimAnnotation '@mappings' containedin=docvimBlock contained
+syntax match docvimAnnotation '\v\@option( .+)?' containedin=docvimBlock contained
+syntax match docvimAnnotation '@options' containedin=docvimBlock contained
+syntax match docvimAnnotation '@param' containedin=docvimBlock contained
+syntax match docvimAnnotation '\v\@plugin( .+)?' containedin=docvimBlock contained
+syntax match docvimAnnotation '@private' containedin=docvimBlock contained
+syntax match docvimBackticks '\v`[^\s`]+`' containedin=docvimBlock contained
+syntax match docvimBlockquote '\v^\s*"\s+\zs\>\s+.+$' containedin=docvimBlock contained
+syntax match docvimCrossReference '\v\c\|:?[a-z0-9()<>\.:-]+\|' containedin=docvimBlock contained
+syntax match docvimHeading '\v^\s*"\s+\zs#\s+.+$' containedin=docvimBlock contained
+syntax match docvimPreComment '\v^\s*"' containedin=docvimPre contained
+syntax match docvimSetting "\v'[a-z]{2,}'" containedin=docvimBlock contained
+syntax match docvimSetting "\v't_..'" containedin=docvimBlock contained
+syntax match docvimSpecial '\v\<CSM-.\>' containedin=docvimBlock contained
+syntax match docvimSpecial '\v\<[-a-zA-Z0-9_]+\>' containedin=docvimBlock contained
+syntax match docvimSubheading '\v^\s*"\s+\zs##\s+.+$' containedin=docvimBlock contained
+syntax match docvimTarget '\v\c\*:?[a-z0-9()<>-]+\*' containedin=docvimBlock contained
+
+" Stolen from $VIMRUNTIME/syntax/help.vim:
+syntax match docvimURL `\v<(((https?|ftp|gopher)://|(mailto|file|news):)[^'    <>"]+|(www|web|w3)[a-z0-9_-]*\.[a-z0-9._-]+\.[^'        <>"]+)[a-zA-Z0-9/]` containedin=docvimBlock contained
+
+if has('conceal')
+  syntax match docvimBacktick '\v`' containedin=docvimBackticks contained conceal
+  syntax match docvimBar '\v\|' containedin=docvimCrossReference contained conceal
+  syntax match docvimHeadingPrefix '\v# ' containedin=docvimHeading contained conceal
+  syntax match docvimStar '\v\*' containedin=docvimTarget contained conceal
+  syntax match docvimSubheadingPrefix '\v## ' containedin=docvimSubheading contained conceal
+else
+  syntax match docvimBacktick '\v`' containedin=docvimBackticks contained
+  syntax match docvimBar '\v\|' containedin=docvimCrossReference contained
+  syntax match docvimHeadingPrefix '\v# ' containedin=docvimHeading contained
+  syntax match docvimStar '\v\*' containedin=docvimTarget contained
+  syntax match docvimSubheadingPrefix '\v## ' containedin=docvimSubheading contained
+endif
+
+function! s:italicize(name, link)
+  try
+    execute 'highlight! ' . a:name . ' ' . pinnacle#italicize(a:link)
+  catch
+    execute 'highlight! link ' . a:name . ' ' . a:link
+  endtry
+endfunction
+
+function! s:highlight()
+  call s:italicize('docvimAnnotation', 'String')
+  call s:italicize('docvimBacktick', 'Comment')
+  call s:italicize('docvimBackticks', 'Comment')
+  call s:italicize('docvimBar', 'Identifier')
+  call s:italicize('docvimBlock', 'Normal')
+  call s:italicize('docvimBlockquote', 'Comment')
+  call s:italicize('docvimComment', 'Normal')
+  call s:italicize('docvimCrossReference', 'Identifier')
+  call s:italicize('docvimHeading', 'Identifier')
+  call s:italicize('docvimHeadingPrefix', 'Identifier')
+  call s:italicize('docvimPre', 'Comment')
+  call s:italicize('docvimSetting', 'Type')
+  call s:italicize('docvimSpecial', 'Special')
+  call s:italicize('docvimStar', 'String')
+  call s:italicize('docvimSubheading', 'PreProc')
+  call s:italicize('docvimSubheadingPrefix', 'PreProc')
+  call s:italicize('docvimTarget', 'String')
+  call s:italicize('docvimURL', 'String')
+endfunction
+
+if has('autocmd')
+  augroup Docvim
+    autocmd!
+    autocmd ColorScheme * call s:highlight()
+  augroup END
+endif
+
+call s:highlight()
diff --git a/tests/fixtures/integration/vim-docvim/input/ftplugin/vim.vim b/tests/fixtures/integration/vim-docvim/input/ftplugin/vim.vim
new file mode 100644 (file)
index 0000000..42b66da
--- /dev/null
@@ -0,0 +1,6 @@
+set conceallevel=2
+set concealcursor=nc
+
+" https://groups.google.com/forum/#!topic/vim_dev/M8FBQIM6-aY
+let s:path=resolve(expand('<sfile>:p:h:h')) . '/after'
+execute 'set rtp+=' . s:path