Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add groff syntax #1685

Merged
merged 1 commit into from
Jul 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -217,4 +217,7 @@
url = https://github.com/vidann1/visual-studio-dark-plus.git
[submodule "assets/syntaxes/02_Extra/SublimeEthereum"]
path = assets/syntaxes/02_Extra/SublimeEthereum
url = https://github.com/davidhq/SublimeEthereum.git
url = https://github.com/davidhq/SublimeEthereum.git
[submodule "assets/syntaxes/02_Extra/Groff"]
path = assets/syntaxes/02_Extra/Groff
url = https://github.com/carsonoid/sublime_man_page_support
16 changes: 16 additions & 0 deletions assets/patches/Groff.sublime-syntax.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
diff --git syntaxes/02_Extra/Groff/Man Page/Man Page.sublime-syntax syntaxes/02_Extra/Groff/Man Page/Man Page.sublime-syntax
index 57834af..6648664 100644
--- syntaxes/02_Extra/Groff/Man Page/Man Page.sublime-syntax
+++ syntaxes/02_Extra/Groff/Man Page/Man Page.sublime-syntax
@@ -4,9 +4,9 @@
# - man-pages(7)
# - groff(7)
---
-name: Man Page (groff/troff)
+name: Groff/troff
scope: text.groff
-file_extensions: [man, groff, troff, '1', '2', '3', '4', '5', '6', '7']
+file_extensions: [groff, troff, '1', '2', '3', '4', '5', '6', '7', '8', '9']

contexts:
main:
1 change: 1 addition & 0 deletions assets/syntaxes/02_Extra/Groff
Submodule Groff added at 651091
126 changes: 126 additions & 0 deletions tests/syntax-tests/highlighted/Groff/rustdoc.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
.TH RUSTDOC "1" "<INSERT DATE HERE>" "rustdoc <INSERT VERSION HERE>" "User Commands"
.SH NAME
rustdoc \- generate documentation from Rust source code
.SH SYNOPSIS
.B rustdoc
[\fIOPTIONS\fR] \fIINPUT\fR

.SH DESCRIPTION
This tool generates API reference documentation by extracting comments from
source code written in the Rust language, available at
<\fBhttps://www.rust-lang.org\fR>. It accepts several input formats and
provides several output formats for the generated documentation.

.SH OPTIONS

.TP
\fB\-r\fR, \fB\-\-input\-format\fR \fIFORMAT\fR
rust
.TP
\fB\-w\fR, \fB\-\-output\-format\fR \fIFORMAT\fR
html
.TP
\fB\-o\fR, \fB\-\-output\fR \fIOUTPUT\fR,
where to place the output (default: \fIdoc/\fR for html)
.TP
\fB\-\-passes\fR \fILIST\fR
space\[hy]separated list of passes to run (default: '')
.TP
\fB\-\-no\-defaults\fR
don't run the default passes
.TP
\fB\-\-plugins\fR \fILIST\fR
space-separated list of plugins to run (default: '')
.TP
\fB\-\-plugin\-path\fR \fIDIR\fR
directory to load plugins from (default: \fI/tmp/rustdoc_ng/plugins\fR)
.TP
\fB\-\-target\fR \fITRIPLE\fR
target triple to document
.TP
\fB\-\-crate\-name\fR \fINAME\fR
specify the name of this crate
.TP
\fB\-L\fR, \fB\-\-library\-path\fR \fIDIR\fR
directory to add to crate search path
.TP
\fB\-\-cfg\fR \fISPEC\fR
pass a \fI\-\-cfg\fR to rustc
.TP
\fB\-\-extern\fR \fIVAL\fR
pass an \fI\-\-extern\fR to rustc
.TP
\fB\-\-test\fR
run code examples as tests
.TP
\fB\-\-test\-args\fR \fIARGS\fR
pass arguments to the test runner
.TP
\fB\-\-html\-in\-header\fR \fIFILE\fR
file to add to <head>
.TP
\fB\-\-html\-before\-content\fR \fIFILES\fR
files to include inline between <body> and the content of a rendered Markdown
file or generated documentation
.TP
\fB\-\-markdown\-before\-content\fR \fIFILES\fR
files to include inline between <body> and the content of a rendered
Markdown file or generated documentation
.TP
\fB\-\-html\-after\-content\fR \fIFILES\fR
files to include inline between the content and </body> of a rendered
Markdown file or generated documentation
.TP
\fB\-\-markdown\-after\-content\fR \fIFILES\fR
files to include inline between the content and </body> of a rendered
Markdown file or generated documentation
.TP
\fB\-\-markdown\-css\fR \fIFILES\fR
CSS files to include via <link> in a rendered Markdown file Markdown file or
generated documentation
.TP
\fB\-\-markdown\-playground\-url\fR \fIURL\fR
URL to send code snippets to
.TP
\fB\-\-markdown\-no\-toc\fR
don't include table of contents
.TP
\fB\-h\fR, \fB\-\-extend\-css\fR
to redefine some css rules with a given file to generate doc with your own theme
.TP
\fB\-V\fR, \fB\-\-version\fR
Print rustdoc's version

.SH "OUTPUT FORMATS"

The rustdoc tool can generate output in an HTML format.

If using an HTML format, then the specified output destination will be the root
directory of an HTML structure for all the documentation.
Pages will be placed into this directory, and source files will also
possibly be rendered into it as well.

.SH "EXAMPLES"

To generate documentation for the source in the current directory:
 $ rustdoc hello.rs

List all available passes that rustdoc has, along with default passes:
 $ rustdoc \-\-passes list

The generated HTML can be viewed with any standard web browser.

.SH "SEE ALSO"

.BR rustc (1)

.SH "BUGS"
See <\fBhttps://github.com/rust\-lang/rust/issues\fR>
for issues.

.SH "AUTHOR"
See the version control history or <\fBhttps://thanks.rust\-lang.org\fR>

.SH "COPYRIGHT"
This work is dual\[hy]licensed under Apache\ 2.0 and MIT terms.
See \fICOPYRIGHT\fR file in the rust source distribution.
Loading