-
Notifications
You must be signed in to change notification settings - Fork 9
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
Support for autocompletion of xref xml:ids #30
Comments
vscode xml provide the xml.references to manage this usecase , see https://github.com/redhat-developer/vscode-xml/blob/main/docs/Features/XMLReferencesFeatures.md#attribute-node-references-fooattr Once you will have declared in settings the proper références you will benefit with completion validation hyperlink find références and rename. There are some few limitation when you will use included document. Please read the doc at https://github.com/redhat-developer/vscode-xml/blob/main/docs/Features/XMLReferencesFeatures.md#limitation |
@oscarlevin as you have defined a default vscode-xml settings for pretext, I think this issue can be closed, no? |
It does suggest xml:ids from the currently edited file, but does not see any xml:ids from other files in the PreTeXt project. |
Scanning all files from the project could degrade the performance, but if you use xi:include it should work no? |
It's somewhere in between now. Any xi:included file works (i.e., you see suggestions of refs in files that are below your current file in the tree). But you don't look up the tree. I agree that scanning all files seems like the wrong thing to do (and would be incorrect if you had files that are not part of the main document anyway). What about finding the root document, or setting it as a default for the workspace, and always scanning the xml tree from there? I haven't looked at any code yet, but perhaps there is a way to leverage the xml extension for this purpose. So instead of using the current file, use @angelozerr, do you think a setting like this would be useful for other users of the xml extension? Perhaps an upstream contribution would be worthwhile? |
For the moment there are no way to customize the files scope to scan. Please create an issue in lemminx side with your suggestion in détail. |
Done here: eclipse-lemminx/lemminx#1576 |
I have implemented a version of this directly in pretext-tools now. At startup, the extension scans all the files for xml:ids and stores them. Whenever a file is saved, it refreshes the ids for that file. Seems to be working well so far. Could give false positives if you have files that are not included but still in your source directory. |
No description provided.
The text was updated successfully, but these errors were encountered: