asciidoctor-vscode icon indicating copy to clipboard operation
asciidoctor-vscode copied to clipboard

Add IntelliSense Support for Auto-Completing Anchors

Open bgeels opened this issue 2 years ago • 3 comments
trafficstars

It would be really cool if this plugin supported IntelliSense for Anchors / Attributes defined in any .adoc file found in the opened project.

For example if I have first.adoc like:

:ticket-submission-url: https://open-ticket.example.net

== How to Glom Bleems [[how-to-glom-bleems]]

...and I begin writing a second doc second.adoc in the same project:

Within second.adoc, beginning to type:

  • <<how-to would suggest options to auto-complete matching anchors ( in this case how-to-glom-bleems )
  • {tick would suggest options to auto-complete matching attributes ( in this case ticket-submission-url )

bgeels avatar Aug 08 '23 14:08 bgeels

{tick would suggest options to auto-complete matching attributes ( in this case ticket-submission-url )

I won't work unless you include first.adoc into second.adoc. If you want ticket-submission-url to be available in both first.adoc and second.adoc I recommend to use the .asciidoctorconfig feature.

ggrossetie avatar Aug 08 '23 17:08 ggrossetie

Ah gotcha, I'll look into setting up .asciidoctorconfig. Will setting that up allow for the autocompletion of anchors too? If not would that be something you would consider adding support for?

bgeels avatar Aug 08 '23 18:08 bgeels

Will setting that up allow for the autocompletion of anchors too? If not would that be something you would consider adding support for?

No, as far as I know this feature is not implemented. On a side-note, I believe that the following syntax is preferred:

[#how-to-glom-bleems]
== How to Glom Bleems

ggrossetie avatar Aug 11 '23 15:08 ggrossetie