Skip to content
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

Autocomplete xref suggests version coord even if true #1708

Closed
bartkl opened this issue Oct 8, 2024 · 3 comments
Closed

Autocomplete xref suggests version coord even if true #1708

bartkl opened this issue Oct 8, 2024 · 3 comments
Assignees
Labels

Comments

@bartkl
Copy link

bartkl commented Oct 8, 2024

Description

Hi,

I'm somewhat confused about the autocomplete behavior when cross-referencing pages in other component versions.

Files

Playbook

Content sources section in my antora-playbook-local.yml:

  sources:
    - url: .
      branches: HEAD
      start_path: ./root_component
    - url: ../doc-writing-guide/
      branches: HEAD

Component versions

Root component version

The decriptor, i.e. contents of antora.yml:

name: ROOT
title: Documentation
version: ~
nav:
- modules/ROOT/nav.adoc
Writing Guide component version

The decriptor, i.e. contents of antora.yml:

name: writing-guide
title: Writing Guide
version: true
prerelease: "-draft"
start_page: index.adoc
nav:
- modules/ROOT/nav.adoc

The problem

I'm editing the ROOT/pages/index.adoc file in my ROOT component, where I'm trying to cross-reference a page in my writing-guide component:

image

As you can see from my typing, I don't want to refer to an explicit version here. Regardless, the autocomplete forces me to use that.

Is this expected behavior? Am I perhaps misunderstanding something?

Thanks for your help and this great plugin!

@bartkl bartkl added the question label Oct 8, 2024
@ahus1 ahus1 added bug and removed question labels Oct 21, 2024
@ahus1 ahus1 self-assigned this Oct 21, 2024
@ahus1
Copy link
Contributor

ahus1 commented Oct 21, 2024

Thank you for providing this example. I think you found two bugs:

  • The version version should never appear in autocomplete as it is a version which will be replaced by the Git refname
  • The autocomplete should contain entries without a version number for component with the highest version number

I'll fix this in the next upcoming release. I'll let you know once a preview is available.

@ahus1 ahus1 closed this as completed Oct 21, 2024
ahus1 added a commit that referenced this issue Oct 21, 2024
…t component version (#1708)

Autocomplete will never suggest the version `true` as it has a special meaning (#1708)
@ahus1
Copy link
Contributor

ahus1 commented Oct 26, 2024

The issue you reported should now be fixed in pre-release 0.43.2 of the plugin. I hope it now works for you as you expect.

The pre-release of the plugin is available from GitHub releases and the IntelliJ AsciiDoc EAP repository.

@bartkl
Copy link
Author

bartkl commented Oct 30, 2024

Yes, it works fine now. Thanks for the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants