Is your enhancement related to a problem? Please describe.
Currently, yaml-language-server has functionality that works as follows:
- It shows a code lens at the top of a YAML file to view the schema.
- The code lens contains a command (
jumpToSchema).
- When the client runs the command with
workspace/executeCommand, yaml-language-server will in turn invoke window/showDocument.
- The document to show has a URI with scheme
json-schema.
- The client has to have some glue code to handle that schema.
Describe the solution you would like
Implement workspace/textDocumentContent from the (new, as of this writing) 3.18 LSP spec. The flow would then look like this:
- It shows a code lens at the top of a YAML file to view the schema.
- The code lens contains a command (
jumpToSchema).
- When the client runs the command with
workspace/executeCommand, yaml-language-server will in turn invoke window/showDocument.
- The document to show has a URI with scheme
json-schema.
- The client sees that yaml-language-server has support for
json-schema schemes
- The client issues a
workspace/textDocumentContent request to yaml-language-server
- Yaml-language-server returns the content.
- The client displays the content.
Describe alternatives you have considered
N/A
Additional context
N/A
Is your enhancement related to a problem? Please describe.
Currently, yaml-language-server has functionality that works as follows:
jumpToSchema).workspace/executeCommand, yaml-language-server will in turn invokewindow/showDocument.json-schema.Describe the solution you would like
Implement
workspace/textDocumentContentfrom the (new, as of this writing) 3.18 LSP spec. The flow would then look like this:jumpToSchema).workspace/executeCommand, yaml-language-server will in turn invokewindow/showDocument.json-schema.json-schemaschemesworkspace/textDocumentContentrequest to yaml-language-serverDescribe alternatives you have considered
N/A
Additional context
N/A