GithubHelp home page GithubHelp logo

Comments (7)

ggrossetie avatar ggrossetie commented on July 2, 2024

It should already work if you enable Antora support. Here's an example:

Capture d’écran 2024-03-16 à 11 46 31

from asciidoctor-vscode.

man-chi avatar man-chi commented on July 2, 2024

it is odd. the image does not preview by default. unless add the following imagesdir entry in settings.json
"asciidoc.preview.asciidoctorAttributes": {
"imagesdir":"../images/"
}

@ggrossetie is your vscode a specific version? nightly build? anything we need to do?
I am running vscode Version: 1.87.2
vscode-asciidoc extension v3.2.0

from asciidoctor-vscode.

ggrossetie avatar ggrossetie commented on July 2, 2024

Do you have "asciidoc.antora.enableAntoraSupport": true in your settings? Did you get a popup asking you to enable Antora support?
Do you have an antora.yml file with a name and version? Do you have a valid Antora structure?

I'm using version 3.2.0 of the extension:

Version : 1.86.0 (Universal)
Validation : 05047486b6df5eb8d44b2ecd70ea3bdf775fd937
Date : 2024-01-31T10:29:15.765Z
Electron : 27.2.3
ElectronBuildId : 26495564
Chromium : 118.0.5993.159
Node.js : 18.17.1
V8 : 11.8.172.18-electron.0
Système d’exploitation : Darwin arm64 23.2.0

from asciidoctor-vscode.

man-chi avatar man-chi commented on July 2, 2024

yes, in my Code/user/settings.json, I do have

"asciidoc.antora.enableAntoraSupport": true,

Did you get a popup asking you to enable Antora support?
I recalled that there was a dialog box showed up before but I did not manage to click yes. afterward, I do not have any opportunity to see the option again. how can I see the popup again?

I do the antora.yml file and I have been using antora site generation successfully for the past few months.
the structure is the standard of antora, such as
Screen Shot 2024-03-17 at 12 36 16 AM

antora.yml

title: Main
name: main
version: ~
nav:
  - modules/ROOT/nav.adoc
asciidoc:
  attributes:
    page-pagination: ''
    experimental: ''
    idprefix: ''
    idseparator: '-'

from asciidoctor-vscode.

ggrossetie avatar ggrossetie commented on July 2, 2024

@man-chi We save this setting in the workspace state but as far as I know there's no easy way to reset this state. You will need to delete files from your disk:

<user-data-dir>\User\globalStorage\state.vscdb
<user-data-dir>\User\workspaceStorage\<workspace.id>\state.vscdb

Depending on how VS Code was launched you could have a Single Folder Workspace or a Multi-Folder Workspace that is global or local. Globally, the data lives here:

Linux: $HOME/.config/Code/
OS X: $HOME/Library/Application Support/Code/
Windows: %APPDATA%\Code\

If you reset the workspace state and open nav.adoc the popup should show again. I think we need to add an action to activate/deactivate Antora on a workspace.

The setting "asciidoc.antora.enableAntoraSupport": true is here to enable Antora but then you need to activate Antora per workspace.

from asciidoctor-vscode.

ggrossetie avatar ggrossetie commented on July 2, 2024

I think I will do the following to make it easier to activate/deactivate Antora.

  • Replace the current user/workspace setting by "Show a prompt to enable Antora support when an antora.yml file is detected". yes/no
  • Add a command to toggle Antora support on a given workspace (saved in Memento)

That way you can control if you want a prompt when the extension detects an antora.yml file. And you also have the ability to enable/disable Antora support using a command (in case you clicked "no" on the prompt or in case the extension didn't detect the antora.yml or in case you want to turn it off)

@man-chi What do you think?

from asciidoctor-vscode.

man-chi avatar man-chi commented on July 2, 2024

yes, it sounds awesome. thanks for making such improvement. I love antora.

from asciidoctor-vscode.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.