-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1e376bf
commit ee22f88
Showing
3 changed files
with
94 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,14 @@ Author: Mario Ortiz Manero <[email protected]> | |
Homepage: <https://github.com/marioortizmanero/adoc-pdf-live.nvim> | ||
License: GPLv3 | ||
|
||
============================================================================== | ||
CONTENTS *adoc-pdf-live-contents* | ||
|
||
1. Introduction..............................................|adoc-pdf-live| | ||
2. Usage...............................................|adoc-pdf-live-usage| | ||
3. Commands.........................................|adoc-pdf-live-commands| | ||
4. Configuration...............................|adoc-pdf-live-configuration| | ||
|
||
============================================================================== | ||
INTRODUCTION *adoc-pdf-live* | ||
|
||
|
@@ -22,24 +30,80 @@ lots to improve. | |
============================================================================== | ||
USAGE *adoc-pdf-live-usage* | ||
|
||
|
||
You can setup the plugin with its default configuration with: | ||
You must setup the plugin in order to use it. For the basic setup with the | ||
default options: | ||
|
||
> | ||
require('adoc_pdf_live').setup() | ||
> | ||
Or, to override the default options: | ||
Or, to specify your own custom options: | ||
|
||
> | ||
require('adoc_pdf_live').setup { | ||
viewer = 'zathura', | ||
params = '-r asciidoctor-mathematical -r asciidoctor-diagram -a mathematical-format=svg' | ||
params = '-r asciidoctor-mathematical -r asciidoctor-diagram -a mathematical-format=svg', | ||
style_regex = 'custom-style\\.ya?ml' | ||
} | ||
> | ||
See the configuration section for more information of each option. | ||
See the configuration section for more information about the available | ||
options. | ||
|
||
Once you have an AsciiDoc file open, you can use the `:AdocPdfLiveStart` command | ||
to compile the document whenever the file is saved. `:AdocPdfLiveOpen` will | ||
additionally open your preferred PDF viewer, and `:AdocPdfLiveStop` will stop | ||
the plugin. For more commands, see its section in the documentation. | ||
|
||
It's highly recommended to use a PDF viewer like zathura [1] which | ||
automatically reloads the file when it's modified, so that the live reloading | ||
is seamless. | ||
|
||
Yaml style files [2] are roughly supported. This plugin will automatically | ||
look for one and enable it when compiling the PDF, with the `style_regex` | ||
option. You can override it with the `style` option or the `:AdocPdfLiveStyle | ||
STYLE` command. | ||
|
||
[1] https://pwmt.org/projects/zathura/ | ||
[2] https://github.com/asciidoctor/asciidoctor-pdf/blob/main/docs/theming-guide.adoc | ||
|
||
============================================================================== | ||
COMMANDS *adoc-pdf-live-commands* | ||
|
||
|:AdocPdfLiveStart| *:AdocPdfLiveStart* | ||
|
||
Start compiling the document whenever the AsciiDoc file is saved. | ||
|
||
If a style file isn't set, the plugin will try to find one with the configured | ||
regex in the `style-regex` option. | ||
|
||
|:AdocPdfLiveOpen| *:AdocPdfLiveOpen* | ||
|
||
Start compiling the document whenever the AsciiDoc file is saved and open the | ||
configured PDF viewer with it. | ||
|
||
If a style file isn't set, the plugin will try to find one with the configured | ||
regex in the `style-regex` option. | ||
|
||
|:AdocPdfLiveStop| *:AdocPdfLiveStop* | ||
|
||
Stop compiling the document for each save. | ||
|
||
|:AdocPdfLiveStyle| *:AdocPdfLiveStyle* | ||
|
||
Given a style yaml file as a parameter, override the current one with it. | ||
|
||
|:AdocPdfLiveLogs| *:AdocPdfLiveLogs* | ||
|
||
See the logs for the lifetime of the plugin. | ||
|
||
|:AdocPdfLiveDebug| *:AdocPdfLiveDebug* | ||
|
||
Enable debug mode. | ||
|
||
|:AdocPdfLiveNoDebug| *:AdocPdfLiveNoDebug* | ||
|
||
Disable debug mode. | ||
|
||
============================================================================== | ||
CONFIGURATION *adoc-pdf-live-config* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters