Validation of AsciiDoc files
The AsciiDoc plugin for IntelliJ validates cross-references and attributes.
How the plugin can help with validation
The IDE can validate, for example, cross-references and attribute names for a set of AsciiDoc files. It will also provide auto-completion for attribute names and references.
To do this, all files need to be in one project.
If the IDE opens a single file and not a project with all related files, it might show validation errors where it shouldn’t.
Validation of source code snippets
For source code with a specified language, the IDE will inject the language context and will show validation errors.
System.out.println("Hello, world!");
In the plugin’s settings, a user can hide errors in source blocks for all languages, or for specific languages.
To prevent this on individual code blocks, add the option novalidate
to the source block.
This option is a non-standard AsciiDoc option and specific to the AsciiDoc plugin for IntelliJ.
This is available since plugin version 0.43.3. |
novalidate
option to the beginning[%novalidate,java]
----
System.out.println("Hello, world!");
----
novalidate
option to the opts
attributes[,java,opts=novalidate]
----
System.out.println("Hello, world!");
----
Add the opts=novalidate
using an intent in the editor by pressing Alt+Enter ⌥ ↩ and choosing Hide errors in source blocks for this block.
This is available since plugin version 0.43.3. The intent is available from 0.43.4. |
How to edit files as a project
The user selects the menu item
, then selects the folder and opens it. The IDE will open files in the folder and its sub-folder as one project. Validation and auto-completion then works as expected.If the user opens the dialog to open a single file, the file will not be part of a project. The IDE can then only provide a sub-set of auto-completion and validation.
Further reading
If files are in separate distinct folders and still belong together, the user can group them into one project. See chapter Multi-module Projects for more information.