You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Useful attributes for a C++ symbol displayed in call hierarchy or just searched for would probably include (but not limited to) signature, scope, return value, access specifier.
Similar set of useful attributes for other languages will likely differ but at least for C, C++ and Java this set already has more than two entries. Currently implementations are probably trying to fit all of these data items into single detail field of CallHierarchyItem, DocumentSymbol etc. using funny encoding which needs to be parsed by hand.
How
To improve this, let's add another property languageSpecificDetails of type LSPArray to CallHierarchyItem, DocumentSymbol etc.
This new property would be used by language server to communicate useful language-specific attributes as key/value pairs, easing life of client and allowing for more attributes to be passed.
Further steps
Some useful attributes like method signature appear to be common to many different languages and servers may choose to unify corresponding key names across supported languages, allowing for better unified structured UI implementations. Well-known keys shoud probably be not a fixed set but just a list of strings (with descriptions?) allowing for any extension.
Originally discussed in clangd/clangd#1940 regarding extra details for callHierarchy.
The text was updated successfully, but these errors were encountered:
Why
Useful attributes for a
C++
symbol displayed in call hierarchy or just searched for would probably include (but not limited to) signature, scope, return value, access specifier.Similar set of useful attributes for other languages will likely differ but at least for
C
,C++
andJava
this set already has more than two entries. Currently implementations are probably trying to fit all of these data items into singledetail
field ofCallHierarchyItem
,DocumentSymbol
etc. using funny encoding which needs to be parsed by hand.How
To improve this, let's add another property
languageSpecificDetails
of type LSPArray toCallHierarchyItem
,DocumentSymbol
etc.This new property would be used by language server to communicate useful language-specific attributes as key/value pairs, easing life of client and allowing for more attributes to be passed.
Further steps
Some useful attributes like
method signature
appear to be common to many different languages and servers may choose to unify corresponding key names across supported languages, allowing for better unified structured UI implementations. Well-known keys shoud probably be not a fixed set but just a list of strings (with descriptions?) allowing for any extension.Originally discussed in clangd/clangd#1940 regarding extra details for callHierarchy.
The text was updated successfully, but these errors were encountered: