-
-
Notifications
You must be signed in to change notification settings - Fork 145
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
Respect imagesdir when resolving image paths in source file #275
Comments
Maybe I can take a look at the PsireferencesProvider bit later this week. |
@alshain - I look forward to see a solution here! Please note: variables (like Let me know if you want to tackle this as well, or if you want that to be solved before. |
I'm starting working on this. Current plan: replace FileReferenceSet in AsciiDocBlockMacro with my own implementation to resolve variables in general and taking into account imagesDir for all image::[]. |
The preview release 0.28.15 now resolves attributes in macros, supports ".." and respects the imagesDir for images macros. It also supports inline macros (previously only block macros were supported). As part of the suggested completions also shows ".." and all attributes that resolve to an existing file or directory. Attributes are shown in the list with the resolved value. You can navigate using Ctrl+Click and Ctrl+B to each of part of the path. As of today the discovery of attributes in a compact definition like this
is not supported in the lexer/paser, please use the longer variant
|
please comment here with
|
… allow empty body for example for kbd #275
This is in available in the latest public release of the plugin (0.28.17+) in the regular channel. |
When typing
images::
and invoking auto-complete, completions are provided seem to be based on the current file's directory.However, using
imagesdir: ./img
for example at the top of the file, those paths are relative to a subdirectory, which neither the auto completion nor the ctrl-click thing processes correctly.asciidoctor-intellij-plugin/src/main/java/org/asciidoc/intellij/psi/AsciiDocBlockMacro.java
Line 48 in b4ffa3a
I'm guessing here one would need to detect 1) that an image path is being processed 2) the
imagesdir
thing is used and make use of aPsiReferencesProvider
.This would probably solve both things, as well as allow IntelliJ to automatically update the image paths when renaming files.
#253
The text was updated successfully, but these errors were encountered: