intersystems / language-server

Repository for the VS Code Language Server
https://marketplace.visualstudio.com/items?itemName=intersystems.language-server
Other
16 stars 6 forks source link

XML completion for %Studio.AbstractDocument subclasses #334

Closed isc-tleavitt closed 4 months ago

isc-tleavitt commented 5 months ago

%Studio.AbstractDocument has Projection RegisterExtension As %Projection.StudioDocument which defines:

/// Schema associated with this document type, used by Studio Assist
Parameter XMLNamespace As STRING;

Studio used to support this for editing of "Other" document types but it actually appears to be broken in latest Studio (and this was always a little finicky, in my recollection).

Discussed with @isc-bsaviano - I'd love to have this both for the built-in types (e.g., .DFI, .LUT) and for user-space types (practically speaking, just .ZPM from https://github.com/intersystems/ipm)

isc-bsaviano commented 5 months ago

This would be tricky to add. The Language Server declares the languages and URI schemes that it supports on activation. If a file doesn't match any of those tuples, VS Code won't ask our extension for intellisense requests for that document. Therefore, we'd need to declare the file extensions we support up front. We'd also need to parse those files to get the semantic tokens and will have to fail gracefully for all the other intellisense requests for those documents that we don't want to answer. I will discuss this with @isc-rsingh but I don't think there's enough value here to be worth the development effort.

isc-bsaviano commented 4 months ago

I discussed this with Raj and we both feel that this change won't bring enough benefit to be worth the effort.