yaml-language-server icon indicating copy to clipboard operation
yaml-language-server copied to clipboard

Feature Request: document symbols to provide string values

Open amiramw opened this issue 5 years ago • 2 comments

Currently document symbols returned are only keys of primitives, objects and arrays. Keys of primitives are returned with kind 15 (String).

Is it possible to return also values, specifically strings? This will allow showing a reacher outline that shows also the values of the properties (short ones) and not only the keys.

I guess the kind of keys can change to 20 (Key) and the kind of value strings can be 15 (String).

amiramw avatar Sep 12 '19 08:09 amiramw

Could this feature be implemented at the level of this repository?

  • It seems that the logic of building the symbols is inside the JSON Language Server.
    • https://github.com/redhat-developer/yaml-language-server/blob/master/src/languageservice/services/documentSymbols.ts#L48
    • https://github.com/microsoft/vscode-json-languageservice/blob/master/src/services/jsonDocumentSymbols.ts

Should a feature request be opened in the vscode-json-languageservice repo?

bd82 avatar Jan 21 '20 19:01 bd82

Yeah I don't think this is something that can be implemented here, but it would be an interesting add if its possible

JPinkney avatar Jan 21 '20 20:01 JPinkney