on master help sign in
Add groff syntax
7537e30Ville Skyttä
.gitmodules+4−1
@@ -217,4 +217,7 @@
217 url = https://github.com/vidann1/visual-studio-dark-plus.git
217 url = https://github.com/vidann1/visual-studio-dark-plus.git
218[submodule "assets/syntaxes/02_Extra/SublimeEthereum"]
218[submodule "assets/syntaxes/02_Extra/SublimeEthereum"]
219 path = assets/syntaxes/02_Extra/SublimeEthereum
219 path = assets/syntaxes/02_Extra/SublimeEthereum
220− url = https://github.com/davidhq/SublimeEthereum.git
220+ url = https://github.com/davidhq/SublimeEthereum.git
221+[submodule "assets/syntaxes/02_Extra/Groff"]
222+ path = assets/syntaxes/02_Extra/Groff
223+ url = https://github.com/carsonoid/sublime_man_page_support
assets/patches/Groff.sublime-syntax.patchnew file+16
@@ -0,0 +1,16 @@
1+diff --git syntaxes/02_Extra/Groff/Man Page/Man Page.sublime-syntax syntaxes/02_Extra/Groff/Man Page/Man Page.sublime-syntax
2+index 57834af..6648664 100644
3+--- syntaxes/02_Extra/Groff/Man Page/Man Page.sublime-syntax
4++++ syntaxes/02_Extra/Groff/Man Page/Man Page.sublime-syntax
5+@@ -4,9 +4,9 @@
6+ # - man-pages(7)
7+ # - groff(7)
8+ ---
9+-name: Man Page (groff/troff)
10++name: Groff/troff
11+ scope: text.groff
12+-file_extensions: [man, groff, troff, '1', '2', '3', '4', '5', '6', '7']
13++file_extensions: [groff, troff, '1', '2', '3', '4', '5', '6', '7', '8', '9']
14+
15+ contexts:
16+ main:
assets/syntaxes/02_Extra/Groffnew file+1

Submodule changed.

tests/syntax-tests/highlighted/Groff/rustdoc.1new file+126
@@ -0,0 +1,126 @@
1+.TH RUSTDOC "1" "<INSERT DATE HERE>" "rustdoc <INSERT VERSION HERE>" "User Commands"
2+.SH NAME
3+rustdoc \- generate documentation from Rust source code
4+.SH SYNOPSIS
5+.B rustdoc
6+[\fIOPTIONS\fR] \fIINPUT\fR
7+
8+.SH DESCRIPTION
9+This tool generates API reference documentation by extracting comments from
10+source code written in the Rust language, available at
11+<\fBhttps://www.rust-lang.org\fR>. It accepts several input formats and
12+provides several output formats for the generated documentation.
13+
14+.SH OPTIONS
15+
16+.TP
17+\fB\-r\fR, \fB\-\-input\-format\fR \fIFORMAT\fR
18+rust
19+.TP
20+\fB\-w\fR, \fB\-\-output\-format\fR \fIFORMAT\fR
21+html
22+.TP
23+\fB\-o\fR, \fB\-\-output\fR \fIOUTPUT\fR,
24+where to place the output (default: \fIdoc/\fR for html)
25+.TP
26+\fB\-\-passes\fR \fILIST\fR
27+space\[hy]separated list of passes to run (default: '')
28+.TP
29+\fB\-\-no\-defaults\fR
30+don't run the default passes
31+.TP
32+\fB\-\-plugins\fR \fILIST\fR
33+space-separated list of plugins to run (default: '')
34+.TP
35+\fB\-\-plugin\-path\fR \fIDIR\fR
36+directory to load plugins from (default: \fI/tmp/rustdoc_ng/plugins\fR)
37+.TP
38+\fB\-\-target\fR \fITRIPLE\fR
39+target triple to document
40+.TP
41+\fB\-\-crate\-name\fR \fINAME\fR
42+specify the name of this crate
43+.TP
44+\fB\-L\fR, \fB\-\-library\-path\fR \fIDIR\fR
45+directory to add to crate search path
46+.TP
47+\fB\-\-cfg\fR \fISPEC\fR
48+pass a \fI\-\-cfg\fR to rustc
49+.TP
50+\fB\-\-extern\fR \fIVAL\fR
51+pass an \fI\-\-extern\fR to rustc
52+.TP
53+\fB\-\-test\fR
54+run code examples as tests
55+.TP
56+\fB\-\-test\-args\fR \fIARGS\fR
57+pass arguments to the test runner
58+.TP
59+\fB\-\-html\-in\-header\fR \fIFILE\fR
60+file to add to <head>
61+.TP
62+\fB\-\-html\-before\-content\fR \fIFILES\fR
63+files to include inline between <body> and the content of a rendered Markdown
64+file or generated documentation
65+.TP
66+\fB\-\-markdown\-before\-content\fR \fIFILES\fR
67+files to include inline between <body> and the content of a rendered
68+Markdown file or generated documentation
69+.TP
70+\fB\-\-html\-after\-content\fR \fIFILES\fR
71+files to include inline between the content and </body> of a rendered
72+Markdown file or generated documentation
73+.TP
74+\fB\-\-markdown\-after\-content\fR \fIFILES\fR
75+files to include inline between the content and </body> of a rendered
76+Markdown file or generated documentation
77+.TP
78+\fB\-\-markdown\-css\fR \fIFILES\fR
79+CSS files to include via <link> in a rendered Markdown file Markdown file or
80+generated documentation
81+.TP
82+\fB\-\-markdown\-playground\-url\fR \fIURL\fR
83+URL to send code snippets to
84+.TP
85+\fB\-\-markdown\-no\-toc\fR
86+don't include table of contents
87+.TP
88+\fB\-h\fR, \fB\-\-extend\-css\fR
89+to redefine some css rules with a given file to generate doc with your own theme
90+.TP
91+\fB\-V\fR, \fB\-\-version\fR
92+Print rustdoc's version
93+
94+.SH "OUTPUT FORMATS"
95+
96+The rustdoc tool can generate output in an HTML format.
97+
98+If using an HTML format, then the specified output destination will be the root
99+directory of an HTML structure for all the documentation.
100+Pages will be placed into this directory, and source files will also
101+possibly be rendered into it as well.
102+
103+.SH "EXAMPLES"
104+
105+To generate documentation for the source in the current directory:
106+ $ rustdoc hello.rs
107+
108+List all available passes that rustdoc has, along with default passes:
109+ $ rustdoc \-\-passes list
110+
111+The generated HTML can be viewed with any standard web browser.
112+
113+.SH "SEE ALSO"
114+
115+.BR rustc (1)
116+
117+.SH "BUGS"
118+See <\fBhttps://github.com/rust\-lang/rust/issues\fR>
119+for issues.
120+
121+.SH "AUTHOR"
122+See the version control history or <\fBhttps://thanks.rust\-lang.org\fR>
123+
124+.SH "COPYRIGHT"
125+This work is dual\[hy]licensed under Apache\ 2.0 and MIT terms.
126+See \fICOPYRIGHT\fR file in the rust source distribution.
tests/syntax-tests/source/Groff/LICENSE.mdnew file+235
@@ -0,0 +1,235 @@
1+The `rustdoc.1` file has been added from https://github.com/rust-lang/rust/blob/a75e74df89230bc429a550e29d5c566de5f95deb/src/doc/man/rustdoc.1 under the following license:
2+
3+```text
4+Short version for non-lawyers:
5+
6+The Rust Project is dual-licensed under Apache 2.0 and MIT
7+terms.
8+
9+
10+Longer version:
11+
12+Copyrights in the Rust project are retained by their contributors. No
13+copyright assignment is required to contribute to the Rust project.
14+
15+Some files include explicit copyright notices and/or license notices.
16+For full authorship information, see the version control history or
17+https://thanks.rust-lang.org
18+
19+Except as otherwise noted (below and/or in individual files), Rust is
20+licensed under the Apache License, Version 2.0 <LICENSE-APACHE> or
21+<http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
22+<LICENSE-MIT> or <http://opensource.org/licenses/MIT>, at your option.
23+
24+
25+The Rust Project includes packages written by third parties.
26+The following third party packages are included, and carry
27+their own copyright notices and license terms:
28+
29+* LLVM. Code for this package is found in src/llvm-project.
30+
31+ Copyright (c) 2003-2013 University of Illinois at
32+ Urbana-Champaign. All rights reserved.
33+
34+ Developed by:
35+
36+ LLVM Team
37+
38+ University of Illinois at Urbana-Champaign
39+
40+ http://llvm.org
41+
42+ Permission is hereby granted, free of charge, to any
43+ person obtaining a copy of this software and associated
44+ documentation files (the "Software"), to deal with the
45+ Software without restriction, including without
46+ limitation the rights to use, copy, modify, merge,
47+ publish, distribute, sublicense, and/or sell copies of
48+ the Software, and to permit persons to whom the Software
49+ is furnished to do so, subject to the following
50+ conditions:
51+
52+ * Redistributions of source code must retain the
53+ above copyright notice, this list of conditions
54+ and the following disclaimers.
55+
56+ * Redistributions in binary form must reproduce the
57+ above copyright notice, this list of conditions
58+ and the following disclaimers in the documentation
59+ and/or other materials provided with the
60+ distribution.
61+
62+ * Neither the names of the LLVM Team, University of
63+ Illinois at Urbana-Champaign, nor the names of its
64+ contributors may be used to endorse or promote
65+ products derived from this Software without
66+ specific prior written permission.
67+
68+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
69+ ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
70+ TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
71+ PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
72+ SHALL THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE
73+ FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
74+ ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT
75+ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
76+ OTHER DEALINGS WITH THE SOFTWARE.
77+
78+* Additional libraries included in LLVM carry separate
79+ BSD-compatible licenses. See src/llvm-project/llvm/LICENSE.TXT
80+ for details.
81+
82+* compiler-rt, in src/compiler-rt is dual licensed under
83+ LLVM's license and MIT:
84+
85+ Copyright (c) 2009-2014 by the contributors listed in
86+ CREDITS.TXT
87+
88+ All rights reserved.
89+
90+ Developed by:
91+
92+ LLVM Team
93+
94+ University of Illinois at Urbana-Champaign
95+
96+ http://llvm.org
97+
98+ Permission is hereby granted, free of charge, to any
99+ person obtaining a copy of this software and associated
100+ documentation files (the "Software"), to deal with the
101+ Software without restriction, including without
102+ limitation the rights to use, copy, modify, merge,
103+ publish, distribute, sublicense, and/or sell copies of
104+ the Software, and to permit persons to whom the Software
105+ is furnished to do so, subject to the following
106+ conditions:
107+
108+ * Redistributions of source code must retain the
109+ above copyright notice, this list of conditions
110+ and the following disclaimers.
111+
112+ * Redistributions in binary form must reproduce the
113+ above copyright notice, this list of conditions
114+ and the following disclaimers in the documentation
115+ and/or other materials provided with the
116+ distribution.
117+
118+ * Neither the names of the LLVM Team, University of
119+ Illinois at Urbana-Champaign, nor the names of its
120+ contributors may be used to endorse or promote
121+ products derived from this Software without
122+ specific prior written permission.
123+
124+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
125+ ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
126+ TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
127+ PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
128+ SHALL THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE
129+ FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
130+ ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT
131+ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
132+ OTHER DEALINGS WITH THE SOFTWARE.
133+
134+ ========================================================
135+
136+ Copyright (c) 2009-2014 by the contributors listed in
137+ CREDITS.TXT
138+
139+ Permission is hereby granted, free of charge, to any
140+ person obtaining a copy of this software and associated
141+ documentation files (the "Software"), to deal in the
142+ Software without restriction, including without
143+ limitation the rights to use, copy, modify, merge,
144+ publish, distribute, sublicense, and/or sell copies of
145+ the Software, and to permit persons to whom the Software
146+ is furnished to do so, subject to the following
147+ conditions:
148+
149+ The above copyright notice and this permission notice
150+ shall be included in all copies or substantial portions
151+ of the Software.
152+
153+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
154+ ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
155+ TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
156+ PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
157+ SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
158+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
159+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
160+ IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
161+ DEALINGS IN THE SOFTWARE.
162+
163+* Portions of the FFI code for interacting with the native ABI
164+ is derived from the Clay programming language, which carries
165+ the following license.
166+
167+ Copyright (C) 2008-2010 Tachyon Technologies.
168+ All rights reserved.
169+
170+ Redistribution and use in source and binary forms, with
171+ or without modification, are permitted provided that the
172+ following conditions are met:
173+
174+ 1. Redistributions of source code must retain the above
175+ copyright notice, this list of conditions and the
176+ following disclaimer.
177+
178+ 2. Redistributions in binary form must reproduce the
179+ above copyright notice, this list of conditions and
180+ the following disclaimer in the documentation and/or
181+ other materials provided with the distribution.
182+
183+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR
184+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
185+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
186+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
187+ DEVELOPERS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
188+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
189+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
190+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
191+ USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
192+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
193+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
194+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
195+ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
196+ OF SUCH DAMAGE.
197+
198+* libbacktrace, under src/libbacktrace:
199+
200+ Copyright (C) 2012-2014 Free Software Foundation, Inc.
201+ Written by Ian Lance Taylor, Google.
202+
203+ Redistribution and use in source and binary forms, with
204+ or without modification, are permitted provided that the
205+ following conditions are met:
206+
207+ (1) Redistributions of source code must retain the
208+ above copyright notice, this list of conditions and
209+ the following disclaimer.
210+
211+ (2) Redistributions in binary form must reproduce
212+ the above copyright notice, this list of conditions
213+ and the following disclaimer in the documentation
214+ and/or other materials provided with the
215+ distribution.
216+
217+ (3) The name of the author may not be used to
218+ endorse or promote products derived from this
219+ software without specific prior written permission.
220+
221+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
222+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
223+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
224+ AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
225+ NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
226+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
227+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
228+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
229+ USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
230+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
231+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
232+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
233+ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
234+ OF SUCH DAMAGE. */
235+```
tests/syntax-tests/source/Groff/rustdoc.1new file+126
@@ -0,0 +1,126 @@
1+.TH RUSTDOC "1" "<INSERT DATE HERE>" "rustdoc <INSERT VERSION HERE>" "User Commands"
2+.SH NAME
3+rustdoc \- generate documentation from Rust source code
4+.SH SYNOPSIS
5+.B rustdoc
6+[\fIOPTIONS\fR] \fIINPUT\fR
7+
8+.SH DESCRIPTION
9+This tool generates API reference documentation by extracting comments from
10+source code written in the Rust language, available at
11+<\fBhttps://www.rust-lang.org\fR>. It accepts several input formats and
12+provides several output formats for the generated documentation.
13+
14+.SH OPTIONS
15+
16+.TP
17+\fB\-r\fR, \fB\-\-input\-format\fR \fIFORMAT\fR
18+rust
19+.TP
20+\fB\-w\fR, \fB\-\-output\-format\fR \fIFORMAT\fR
21+html
22+.TP
23+\fB\-o\fR, \fB\-\-output\fR \fIOUTPUT\fR,
24+where to place the output (default: \fIdoc/\fR for html)
25+.TP
26+\fB\-\-passes\fR \fILIST\fR
27+space\[hy]separated list of passes to run (default: '')
28+.TP
29+\fB\-\-no\-defaults\fR
30+don't run the default passes
31+.TP
32+\fB\-\-plugins\fR \fILIST\fR
33+space-separated list of plugins to run (default: '')
34+.TP
35+\fB\-\-plugin\-path\fR \fIDIR\fR
36+directory to load plugins from (default: \fI/tmp/rustdoc_ng/plugins\fR)
37+.TP
38+\fB\-\-target\fR \fITRIPLE\fR
39+target triple to document
40+.TP
41+\fB\-\-crate\-name\fR \fINAME\fR
42+specify the name of this crate
43+.TP
44+\fB\-L\fR, \fB\-\-library\-path\fR \fIDIR\fR
45+directory to add to crate search path
46+.TP
47+\fB\-\-cfg\fR \fISPEC\fR
48+pass a \fI\-\-cfg\fR to rustc
49+.TP
50+\fB\-\-extern\fR \fIVAL\fR
51+pass an \fI\-\-extern\fR to rustc
52+.TP
53+\fB\-\-test\fR
54+run code examples as tests
55+.TP
56+\fB\-\-test\-args\fR \fIARGS\fR
57+pass arguments to the test runner
58+.TP
59+\fB\-\-html\-in\-header\fR \fIFILE\fR
60+file to add to <head>
61+.TP
62+\fB\-\-html\-before\-content\fR \fIFILES\fR
63+files to include inline between <body> and the content of a rendered Markdown
64+file or generated documentation
65+.TP
66+\fB\-\-markdown\-before\-content\fR \fIFILES\fR
67+files to include inline between <body> and the content of a rendered
68+Markdown file or generated documentation
69+.TP
70+\fB\-\-html\-after\-content\fR \fIFILES\fR
71+files to include inline between the content and </body> of a rendered
72+Markdown file or generated documentation
73+.TP
74+\fB\-\-markdown\-after\-content\fR \fIFILES\fR
75+files to include inline between the content and </body> of a rendered
76+Markdown file or generated documentation
77+.TP
78+\fB\-\-markdown\-css\fR \fIFILES\fR
79+CSS files to include via <link> in a rendered Markdown file Markdown file or
80+generated documentation
81+.TP
82+\fB\-\-markdown\-playground\-url\fR \fIURL\fR
83+URL to send code snippets to
84+.TP
85+\fB\-\-markdown\-no\-toc\fR
86+don't include table of contents
87+.TP
88+\fB\-h\fR, \fB\-\-extend\-css\fR
89+to redefine some css rules with a given file to generate doc with your own theme
90+.TP
91+\fB\-V\fR, \fB\-\-version\fR
92+Print rustdoc's version
93+
94+.SH "OUTPUT FORMATS"
95+
96+The rustdoc tool can generate output in an HTML format.
97+
98+If using an HTML format, then the specified output destination will be the root
99+directory of an HTML structure for all the documentation.
100+Pages will be placed into this directory, and source files will also
101+possibly be rendered into it as well.
102+
103+.SH "EXAMPLES"
104+
105+To generate documentation for the source in the current directory:
106+ $ rustdoc hello.rs
107+
108+List all available passes that rustdoc has, along with default passes:
109+ $ rustdoc \-\-passes list
110+
111+The generated HTML can be viewed with any standard web browser.
112+
113+.SH "SEE ALSO"
114+
115+.BR rustc (1)
116+
117+.SH "BUGS"
118+See <\fBhttps://github.com/rust\-lang/rust/issues\fR>
119+for issues.
120+
121+.SH "AUTHOR"
122+See the version control history or <\fBhttps://thanks.rust\-lang.org\fR>
123+
124+.SH "COPYRIGHT"
125+This work is dual\[hy]licensed under Apache\ 2.0 and MIT terms.
126+See \fICOPYRIGHT\fR file in the rust source distribution.