-
Notifications
You must be signed in to change notification settings - Fork 91
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
Autocompletion when writing XSDs #111
Comments
I think it's because vscode-xml doesn't bind Have you tried to rename your file with |
Ahh, yeah if I rename the file it works. |
It's an issue for vscode-xml (client side). The XML Language Server doesn't use xml extension. So please create an issue at https:/redhat-developer/vscode-xml/issues, by listing all files extensions like xsd, xsl, csproj, etc I close this issue since it's an issue of vscode-xml. |
@angelozerr does xsd support work correctly in LSP4E? See redhat-developer/vscode-xml#22 (comment) and later comments |
No, same problem. I will investigate it. |
@fbricon there are several problem that I'm fixing:
|
Are schemas cached on disk? |
Yes. |
I have fixed the xs:annotation problme. Now you should have just one xs:annotation instead of 3. |
But it doesn't seem to survive a server restart. We have #73 opened about caching schemas locally. |
I've also gotten it to work after waiting a very long time. |
Ok now I see more better the problem, it should be cool @fbricon if you could help me to fix the problem. I have the same problem with this XML file: <web-app
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
version="3.1">
</web-app> There are 2 problems:
to work those 2 features correctly, I need to open the XML file and open completion and waits for around 1 minute without changing the editor content. After that, XML Schema is cached. Today the XML Schema is loaded twice:
The first improvement that we could do it is to load one time the XML Schema for completion and validation (we must study how xerces load the XML Schema for validation). But the big improvement we should do it is to load the XML Schema in a Thread (with CompletableFuture?) and tell to user that this XML Schema takes time and it is loading (by adding a warn message in the XML top element) and avoid trying to load the XML Schema each time the user changes content inside XML editor. @fbricon is there any chance that you could help me to implement this idea? |
I would suggest to not return a "warning" content but instead just delay the response to the hover. As long as the response is not there, a client will display "Loading...", but if you return a warning content, some clients cache the result and the user will never see the real content (Sourcegraph does this). |
@felixfbecker I agree with you for hover, when I said "warning", I mean for diagnostics. |
I won't be able to work on that but @NikolasKomonen could probably help. Would be nice to fix that performance issue in our next release. It'll prolly make @ifedorenko happier ;-) |
For performance problem (with some XML Schema), I have found it. See #159 I will try to implement it. |
@felixfbecker please reinstall last version of vscode, #159 should fix your problem. |
@angelozerr speed is now good, however I can't seem to get any hover result when editing an xsd file. Is it supposed to work? |
It should work, another bug -( |
Let's close this one about completion. Hover will be handle in #192 |
I am trying to get autocompletion while authoring an XSD.
For this, I declared the XSD as an instance of the XSD meta schema:
However, I am not getting any autocompletion or hovers.
Output channel log:
(no errors)
Version:
vscode-xml-0.1.0-199.vsix
The text was updated successfully, but these errors were encountered: