summaryrefslogtreecommitdiff
path: root/doc/docs/cmdline.rst
diff options
context:
space:
mode:
authorTanner Prynn <tanner.prynn@nccgroup.trust>2016-02-22 16:34:46 -0600
committerTanner Prynn <tanner.prynn@nccgroup.trust>2016-02-22 16:34:46 -0600
commit604256ba5bdd0e7d707201d119db7035f478234d (patch)
tree6be8e1133ef5599b592096ebc876e99d6dd13182 /doc/docs/cmdline.rst
parent8d5dcbc8b124d7c12ca7f5c6e47bc899c848cd6b (diff)
downloadpygments-git-604256ba5bdd0e7d707201d119db7035f478234d.tar.gz
Add api, command line, etc. documentation for custom lexer/formatter loading
Diffstat (limited to 'doc/docs/cmdline.rst')
-rw-r--r--doc/docs/cmdline.rst13
1 files changed, 13 insertions, 0 deletions
diff --git a/doc/docs/cmdline.rst b/doc/docs/cmdline.rst
index 165af969..8fcd3c8c 100644
--- a/doc/docs/cmdline.rst
+++ b/doc/docs/cmdline.rst
@@ -99,6 +99,19 @@ The ``-N`` option guesses a lexer name for a given filename, so that ::
will print out ``python``. It won't highlight anything yet. If no specific
lexer is known for that filename, ``text`` is printed.
+Custom Lexers and Formatters
+----------------------------
+
+.. versionadded:: ?
+
+The ``--load-from-file`` flag enables custom lexers and formatters to be loaded
+from files relative to the current directory. Create a file with a class named
+CustomLexer or CustomFormatter, then specify it on the command line::
+
+ $ pygmentize -l your_lexer.py -f your_formatter.py --load-from-file
+
+For more information, see :doc:`the Pygments documentation on Lexer development
+<lexerdevelopment>`.
Getting help
------------