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
Code completion requests could be answered using the scoping rules defined through a language-specific scope provider. In order to enable such feature, ScopeDescription must support searching for all symbols names - possibly filtered through a text string. I suggest adding the following method to ScopeDescription:
funallVisibleNames(filter:String = ""): Sequence<String> = sequence<String>{
// include names from all local nodes in this scope
namesToLocalSymbolNodes.keys.filter { it.contains(filter) }.forEach { yield(it) }
// include names from all external symbols in this scope
namesToExternalSymbolIdentifiers.keys.filter { it.contains(filter) }.forEach { yield(it) }
// include all visible names from the parent scope (if any)
parent?.allVisibleNames(filter)?.also { yieldAll(it) }
}
Furthermore, the ScopeProvider should provide support to retrieve scopes from string property names and node types, e.g. scopeFor(nodeType: String, propertyName: String): ScopeDescription?. In this way, we would need to retrieve Node instances before asking for the scope of a given reference - which would be cumbersome in the language server and require some sort of node repository access before. This feature would enable computing scopes from information contained in SymbolDescriptions.
The text was updated successfully, but these errors were encountered:
Code completion requests could be answered using the scoping rules defined through a language-specific scope provider. In order to enable such feature,
ScopeDescription
must support searching for all symbols names - possibly filtered through atext
string. I suggest adding the following method toScopeDescription
:Furthermore, the
ScopeProvider
should provide support to retrieve scopes from string property names and node types, e.g.scopeFor(nodeType: String, propertyName: String): ScopeDescription?
. In this way, we would need to retrieveNode
instances before asking for the scope of a given reference - which would be cumbersome in the language server and require some sort of node repository access before. This feature would enable computing scopes from information contained in SymbolDescriptions.The text was updated successfully, but these errors were encountered: