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

Set root of document tree for XML references #1576

Open
oscarlevin opened this issue Aug 24, 2023 · 0 comments
Open

Set root of document tree for XML references #1576

oscarlevin opened this issue Aug 24, 2023 · 0 comments

Comments

@oscarlevin
Copy link

The XML project I'm involved in (PreTeXt) encourages users to use modular files via xi:include. Using the XML vscode plugin, we can set the names for references (in our case, set with xml:id and called with xref ref=). With the correct settings, the suggestions for references when calling one looks down the document tree and includes any ids that are in documents included with the xi:include. However, not surprisingly, you do not see suggestions for ids above the file you are working in.

I understand that scanning the entire project for reference ids is prohibitively time intensive. What about allowing a project to specify a root document though, from which all reference ids are sourced? I assume the language server now looks at the current document to build this list; my suggestion would allow the option of having a static file replace that "current document". This file could then be set by a plugin; if it isn't present, then the current file is used as the root.

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

No branches or pull requests

1 participant